SimpleWings
SimpleWings copied to clipboard
Demo FighterJet template hangs in the air at start.
The picture shows moment 2-3 seconds after start. It just hangs there. If i don't give an initial velocity (using the shooter) or change the transform of the object in the editor (while it is running) it won't move.
I even tried RigidBody.WakeUp() but nothing changed.
So problem is caused by the Weapon object's Rigidbody. Solved by changing to following in Weapon.cs :
private void Awake() { Rigidbody = GetComponent<Rigidbody>(); Rigidbody.detectCollisions = false; } And just set detectCollisions to true in the fire method.
Weird that I never saw this in my project, but you just blew my mind with detectCollisions
. For some reason I never noticed that in the API.