I'm making a 2D top-down shooter style game. I've gotten all the movement bits for the player down, but in it's current state after moving around for a while the player will start to drift left or right relative to the direction it's pointing.
Things to note:
- With the exception of rigidbody this is all hand-written code.
- All of the positioning and rotation is being applied to the rigidbody instead of the transform.
- I have turned off each script that dictates how the player behaves individually, and none of those things were the cause.
- The inputs are not returning unwanted values and no joysticks are plugged in.
- This behavior will temporarily stop if it bumps up against a wall in the direction it's moving.
- The controls are to move up/down/left/right relative to the screen, and not the object. The object however is moving relative to it's direction.
This one's a doozy.
↧