- Edited
I just started prototyping a 3D rail shooter a few days ago. Before dealing with collisions I wanted to get the perfect control for the flying vehicle. I ended up with a KinematicBody, which rotates in three axes. It works goes like this:
1 - rotate each axis according to the mapped keys code: (...) if (compass == 8): #I map directions according to the numpad numbers (...) if (value_z > -20): ship.rotate_z(deg2rad(1.4))
2 - translate the body to the direction it points. code: (...) if (thrust): ship.translate(Vector3(delta*accel2,0,0))
I got to the point where the motion is neat and fluid, however... I forgot that when you translate a kinematicbody it doesn't respect collisions. What I'd like to know:
How to achieve the same effect of translating it to the facing direction, using the move() method (so it'll take collisions into account.). Can I move in the facing direction?
I thank you guys in advance.