In the Unity3d FPS tutorial you set
var projectile : Rigidbody;
1.This is where you put you Grenade right? (Im making a grenade one)
2.How do you put the Grenade on it? It gives me the circle with a line threw it and wont let me drop it.
In the Unity3d FPS tutorial you set
var projectile : Rigidbody;
1.This is where you put you Grenade right? (Im making a grenade one)
2.How do you put the Grenade on it? It gives me the circle with a line threw it and wont let me drop it.
Nvm i got it
var projectile : RigidBody; expects a GameObject with a RigidBody attached.
var projectile : Transform; expects a GameObject with a transform node. All GameObjects have a transform node.
This confused me as it is explained in most tutorials, but it isn’t explained in depth.
projectile.rigidBody.velocity = 6;
this will change your velocity on a “var projectile : Transform;”
to change your velocity on a “var projectile : Rigidbody;”
projectile.velocity = 6;
I hope this explains it a bit better.