I have a player that aims and shoots bullets.
The bullets are an instantiated node of type RigidBody2D.
When I instantiate the bullets, I have no trouble rotating them to the correct appearance in any direction.
When the bullets hit anything else (players, walls, and so on), they bounce properly, as per the physicsmaterialoverride.bounce property, since I set it to 1.
But when the bounce occurs, the bullets still faces the same direction. A fireball fired with a trajectory of (1,1) will still be facing that direction even after reflecting off a wall.
I would like to rotate the whole object to the correct orientation, but do not see how. I want to just get the built-in vector2.bounce() function to work, but I don't know how to get collision data from a RigidBody2D. (All sources I find assume you're using a KinematicBody2D object with moveandcollide, and not a RigidBody2D object with integrate_forces, which is what I am using.)
Halp? :)