Giter Club home page Giter Club logo

Comments (7)

ramunator avatar ramunator commented on May 26, 2024

Yeah i have no idea how to use that as well

from steamworks.net-test.

stoora avatar stoora commented on May 26, 2024

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.

stoora avatar stoora commented on May 26, 2024

Oh sorry,I forgot to mention, that example is with Facepunch.Steamworks and not Steamworks.NET

from steamworks.net-test.

ramunator avatar ramunator commented on May 26, 2024

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.

stoora avatar stoora commented on May 26, 2024

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.

ramunator avatar ramunator commented on May 26, 2024

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.

stoora avatar stoora commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.