Hello everyone, I'm having an issue with constant clockwise rotation. When the mouse is idle, it will rotate endlessly.
When I give mouse input, it can generally begin to turn the correct direction, although at a much slower rate. Vertical movement seems to be okay as well. Just a constant, rightward rotation.
My brain is a bit broken at the moment from trying to debug this. I was hoping someone may be able to spot my issue. I've posted my update method but can provide more information if needed. I'm pretty sure the issue lies here somewhere. ps. this is for a first person camera. I'm using the new input system with my action type as value and control type as vector 2.
Thank you for your time
#Issue with Mouse Input -> Constant rotation
1 messages · Page 1 of 1 (latest)
Log the current rotation before and after rotating.
I'll get on that rn
The Yaw constantly increases from an initial near zero value, to about 2000 when I ended the program. Pitch seems okay.
Can you show the log and how you've your Update method with the logs? !code
Posting code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
a powerful website for storing and sharing text and code snippets. completely free and open source.
should be in the thread now
Uncheck collapse and show a few of the messages when you're rotating but are not pressing anything.
essentially with no input it'll go to either 90 or -90 on the X and the yaw increases indefinitely, this log as over 999 entires in a few seconds
Log the magnitude prior to the if statement.
first log is without movement, second pic is me moving the mouse slightly
From what it seems, delta magnitude is never less than 0.5f so you'll be adding some non-zero offset indefinitely to your character
hmm, are those normal values for magnitude? I'm sure what it should be at if im not moving, i would assume 0?
I'm not sure. I'd check with the tutorial that you are following (assuming that you're following a tutorial as you're unaware of the values to be expected)
naw I just sorta dived in. I haven't really found a relevant tutorial for mouse movement w/ the new input system. But I'll keep plugging away, ty for the help
Consider asking about the expected values in #🖱️┃input-system
Where you'd want to ask about specifically about why the values are what they are.
Folks will tell you about how to setup the new input system to obtain your wanted values or how it works in a better sense so that you may find some accommodation for it.