Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo FighterJet template hangs in the air at start. #6

Open
VikingPingvin opened this issue Jan 22, 2018 · 2 comments
Open

Demo FighterJet template hangs in the air at start. #6

VikingPingvin opened this issue Jan 22, 2018 · 2 comments

Comments

@VikingPingvin
Copy link

VikingPingvin commented Jan 22, 2018

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
Copy link
Author

So problem is caused by the Weapon object's Rigidbody.
Solved by changing to following in Weapon.cs :

private void Awake()
{
Rigidbody = GetComponent();
Rigidbody.detectCollisions = false;
}
And just set detectCollisions to true in the fire method.

@brihernandez
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants