Right now, when I spawn a shootable object, it goes like this:
Because I just set it's angle to this:
float aimAngle = (float) Math.atan2(velocity.y, velocity.x);
bullet.setBodyAngle(aimAngle);
I want it to be like this:
I think I should use angular velocity or torque, but I have no idea how. I can't just set it's angle like in previous code every frame, because it makes physics collisions glitch.
No comments:
Post a Comment