SimpleWings icon indicating copy to clipboard operation
SimpleWings copied to clipboard

Demo FighterJet template hangs in the air at start.

Open VikingPingvin opened this issue 7 years ago • 2 comments

Floating

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.

GIF of the issue

VikingPingvin avatar Jan 22 '18 19:01 VikingPingvin

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.

VikingPingvin avatar Jan 23 '18 07:01 VikingPingvin

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.

brihernandez avatar May 07 '20 12:05 brihernandez