I want to set the rotation instantly. I want it to switch to an angle depending on which key is pressed, but I can’t figure out a way that works with the rigidbody. I need help. Is there a way to set the rotation of a rigidbody instantly?
Just make sure not to call per frame or something similar since it comes with a performance hit. Normally you should be using forces/impulses to move rigid bodies, or be setting the linear/angular velocity directly.
@Werdie_Alt has tried that, but says the results don’t work correctly. I’ll ask @Werdie_Alt to explain the problems to you, since he’s the one who wants to know the answer.
His plan is to set the rotation instantly. So it’s directly set to 90. The rotation needs to be instant. Teleport might help, but there’s a bug, which (as i stated before) @Werdie_Alt could explain.
I want to set the rotation immediately with a rigidbody so that you can move around differently depending on what rotation you’re in. But that’s not important, I want it to just rotate 90 or -90 degrees depending on which key you press. (EX. you press D and it rotates you +90 degrees on the y so you basically turn right or left)
Check the following tutorial on how to use forces and impulses to move your rigid bodies, and also how to use the teleport method to set a precise position/rotation.