Comments (7)
Yeah i have no idea how to use that as well
from steamworks.net-test.
Hi,
add a function to the "Controller.cs" and test/uncomment the method that works with your controller.
public async Task TriggerVibration() { //SteamInput.Internal.Legacy_TriggerHapticPulse( Handle, SteamControllerPad.Right, ushort.MaxValue ); //SteamInput.Internal.Legacy_TriggerRepeatedHapticPulse( Handle, SteamControllerPad.Left, ushort.MaxValue, ushort.MaxValue, ushort.MaxValue, uint.MaxValue ); //SteamInput.Internal.TriggerSimpleHapticEvent( Handle, ControllerHapticLocation.Both, byte.MaxValue, char.MaxValue, byte.MaxValue, char.MaxValue ); //SteamInput.Internal.Legacy_TriggerHapticPulse( Handle, SteamControllerPad.Left, ushort.MaxValue ); //SteamInput.Internal.TriggerVibration( Handle, ushort.MinValue, ushort.MinValue ); //SteamInput.Internal.TriggerVibration( Handle, ushort.MaxValue / 500, ushort.MaxValue / 500 ); //SteamInput.Internal.TriggerSimpleHapticEvent( Handle, ControllerHapticLocation.Both, byte.MaxValue, char.MaxValue, byte.MaxValue, char.MaxValue ); SteamInput.Internal.TriggerSimpleHapticEvent( Handle, ControllerHapticLocation.Both, byte.MaxValue, char.MaxValue, byte.MaxValue, char.MaxValue ); //SteamInput.Internal.TriggerVibration( Handle, ushort.MaxValue, ushort.MinValue); //SteamInput.Internal.TriggerVibrationExtended( Handle, ushort.MinValue, ushort.MinValue, ushort.MaxValue, ushort.MaxValue); // SteamInput.Internal.Legacy_TriggerHapticPulse( Handle, SteamControllerPad.Right, 50000 ); //SteamInput.Internal.Legacy_TriggerRepeatedHapticPulse( Handle, SteamControllerPad.Left, ushort.MaxValue, ushort.MinValue, ushort.MaxValue, uint.MinValue ); //SteamInput.Internal.Legacy_TriggerRepeatedHapticPulse( Handle, SteamControllerPad.Right, 50000, 50000, 10, 0 ); }
Use:
await Task.Run(() => { yourcontroller.TriggerVibration().Wait(); } );
also check out this link: https://tenebrisstudio.itch.io/your-computer-might-be-at-risk/devlog/452070/steaminput-implementation
from steamworks.net-test.
Oh sorry,I forgot to mention, that example is with Facepunch.Steamworks and not Steamworks.NET
from steamworks.net-test.
Shouldnt there be some await inside the triggerVibration Func?
Mine looks like this inside controller.cs
public async Task TriggerVibration( ushort leftSpeed, ushort rightSpeed )
{
SteamInput.Internal.TriggerVibration( Handle, leftSpeed, rightSpeed );
}
from steamworks.net-test.
I'm awaiting the calling thread, so that the game is not blocked waiting for steaminput calls.
await Task.Run(() => yourAsyncSIAPIMethod())
from steamworks.net-test.
Would you mind showing me a basic example you dont need to explain anything just the code you have in the dll and in you unity project. I really appreciate your help seems like no one is using steam input :)
from steamworks.net-test.
add me on linked in (see my full name in my github profile) I'll share my screen and explain the process...
from steamworks.net-test.
Related Issues (15)
- Overlay didnt launch HOT 1
- Steam controller not recognized HOT 5
- GameConnectedFriendChatMsg_t this callback can't be called? HOT 1
- How to get secret key array? HOT 1
- SendLobbyChatMsg should have +1 length
- Utilizing Steamworks cloud feature. HOT 3
- Retrieving Leaderboard scores from each entry.
- How to test Steamworks connection in Unity Editor?
- ExecuteJavascript or window.alert is not working
- Add documentation on how to use the testbed. HOT 1
- Test Input
- Update SteamFriends documentation
- DllNotFoundException: sdkencryptedappticket64 HOT 2
- QuickSettings on SteamDeck does not trigger GameOverlayActivated_t
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steamworks.net-test.