The basic tenant is to ‘Fire and forget’…
No matter where I turn the projectile should remain on target.
I fire a projectile in a GameObject. It travels away from the viewer towards a target in the distance. When I spin the GameObject on the x or y axis, the projectile’s postion spins with the environment. In other words the projectile is heading towards the target. When I stop the GameObject from spinning the original trajectory takes over and the projectile is once again going away from the viewer when it should maintain it’s course towards the original target. So the position of the projectile follows the GameObject’s positioning but the trajectory does not maintain course.
I could call this a feature, but I need a realistic play at first. It is always away from the viewer or if it hits something and bounces off that is the new trajectory even though the world is rotating.
I believe I am mixing component/local values with world values although I am not sure what to check.
Has anybody else seen this?
TIA
The GameObject is a GameObject not a rigidbody.
The projectile is
var Pulsarshoot = Instantiate(Pulsarshoot, GameObject.Find("SpawnPoint").transform.position,Quaternion.identity); Pulsarshoot.rigidbody.AddForce(transform.forward * 50000); Pulsarshoot.transform.parent = GameObject.Find("cueb").transform;
as a rigidbody.
Spawnpoint is a rigidbody.
I believe this is the culprit:
Pulsarshoot.rigidbody.AddForce(transform.forward * 50000);
The force is coming from the rigidbody spawnpoint, correct?