Hi. I’ve been looking for weeks now for Answers or tutorials on this and never come across a solution.
It’s easy to instantiate a bullet at the position/rotation of the firer (in my case, a spaceship in a top down 2D game) and to give the bullet its own speed in the world. The problem is that if you fire forward and are travelling fast, you can overtake your bullet, or at least perceive it to be travelling more slowly than if you spun around and fired backwards behind you (while you were heading “forwards” still).
This is because you’re moving with or away from the bullet but the bullet is always at a constant ‘world’ speed.
How do I get the bullet to take into account the player’s speed (with the appropriate direction) when it’s fired, and add it to the bullet’s rigidbody.velocity? This would allow shots in any direction and at any speed behave properly and look as though they all have the same speed relative to the player’s position.
I don’t want to use raycasting as dodging the bullets is a mechanic.
Thanks - Kevin