Topic was automatically imported from the old Question2Answer platform.
Asked By
Aaron Franke
As far as I know:
I need to use the _integrate_forces() method to rotate a RigidBody without jittering
I need to use the _input() method and cast to InputEventMouseMotion to get mouse movement.
So, how can I do both of these things at once? I tried having _input place the rotation amounts in a temporary variable which is later accessed and reset by _integrate_forces(), but that results in laggy mouse movement.
Does your whole game lag or just the mouse?
If the whole games lag, maybe only read the mouse every 1/60 of a second or 1/30.
coffeeDragon | 2018-07-25 09:14
It’s just the mouse. I also have the arrow keys set up as rotation and it’s smooth as butter.
Alright, so I was able to figure it out. You do indeed have to use both methods, and transfer information between them using a temporary variable (such as Vector2).