24 Replies
gorilla tag to be specific
Depends on what input system the game is using
you can use Keyboard.current etc.
?
the game is in vr it only uses vr inputs
you said mouse and keyboard input
yes
which can be done with Keyboard.current on the new and Input.GetKeyDown on the old inputsystem
one of those will work regardless of VR
and what about mouse movement
like left, right, up and down
Mouse.current.postiion/delta axis in the new inputsystem
or Input.GetMouseAxis or whatever it was called, my memory on it is a bit vague
this is all assuming it's a Unity game of course, but you're using BepInEx and it's a VR game so that's a safe assumption
its a unity game yes
what would that get?
i want the movement of the mouse
so if it goes down itll increase and if its still itll go back to 0
https://docs.unity3d.com/ScriptReference/Input-mousePosition.html you'll have to track the position manually per-frame
the old input system doesn't support per frame mouse delta i don't think
if i do mousePosition - prevMousePosition would that work?
yup
if the game is using the new inputsystem though it's a lot easier
that will give you deltas out of the box
what is the new input system
i dont even know what a delta is...
a delta is a change in something
so a mouse position delta would be how much the mouse position has changed
few minutes ill make something rq to test how it works
help...
it used the old one -_-
uses
uses the new one actually
Input.mousePosition
is the old system
https://docs.unity3d.com/Packages/[email protected]/manual/index.html these are the full docs for it
but it doesn't really cover how to use it like you're trying to
what you want is Mouse.current.
and the properties it has
https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.InputSystem.Mouse.html
delta
will be the change since the last frame, and position
will be the current position in pixel coords
so in full var pos = Mouse.current.position.ReadValue<Vector2>();
The non-generic method 'InputControl<Vector2>.ReadValue()' cannot be used with type arguments
is what i get when i do that
oh yeah just remove
<Vector2>
memory failed me a bit therealready tried that tho
oh wait nvm
i removed JUST Vector2 and left the <>
lemme test it
this is just SPAMMED all over the bepinex console
code:
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.