Does anyone have any idea how to use PonyWolf's vjoy.lua appropriately?

The main reason why I am asking this is to see if I am better off making my own. You see, I need a value to be returned from the joystick to make this other game.

I need the location of the inner circle, so I can rotate the object in the game accordingly and set its linear velocity so that it moves in that direction. So if the circle is at a 90-degree angle, its linear velocity is at (any positive value), 0, it moves right, but does not move up or down.

I’ve been looking at the code in Sticker Knight Platformer, and I have no idea where to start. 

Any tips?  :wacko:

I’m not saying do or do not use vjoy, but … SSK2 has a joystick that produces events with these values

  • vx - x part of stick vector
  • vy - y part…
  • nx - If enabled, normalized vx
  • ny - If enabled, normalized vy
  • angle - Stick angle, where 0 is up, 90 to the right, …
  • percent - 0 to 100 for how far stick is away from the center.
  • state - ON or OFF

https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/easy_inputs/#virtual-joystick-listeners

PS - You’re using standard angles and that is fine, but be aware, not all people treat 90 as up.  Me for example.  It is confusing and doesn’t make sense in the context of display space.

I was not treating 90 as up, I was treating it as right. Unless, that is somehow treating something as up…

Anyways, thanks! I’ll start looking at your joystick.

It works great. Thanks!

I’m not saying do or do not use vjoy, but … SSK2 has a joystick that produces events with these values

  • vx - x part of stick vector
  • vy - y part…
  • nx - If enabled, normalized vx
  • ny - If enabled, normalized vy
  • angle - Stick angle, where 0 is up, 90 to the right, …
  • percent - 0 to 100 for how far stick is away from the center.
  • state - ON or OFF

https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/easy_inputs/#virtual-joystick-listeners

PS - You’re using standard angles and that is fine, but be aware, not all people treat 90 as up.  Me for example.  It is confusing and doesn’t make sense in the context of display space.

I was not treating 90 as up, I was treating it as right. Unless, that is somehow treating something as up…

Anyways, thanks! I’ll start looking at your joystick.

It works great. Thanks!