I am created a top-down shooter and i have the player rotate towards the mouse...i have a script attached to the player to instantiate a grenade to be thrown when the mouse button is clicked. The grenade shoots BUT just drops right to the ground, no force is applied once its instantiated...here is my code...
all help is greatly appreciated!!
asked Oct 21 '10 at 06:57 PM
Make sure that your crate is not colliding with the one throwing it. You can use Physics.ignoreCollision or make sure to offset it to avoid that problem.
If that's not it, assuming your cratePrefab has a non-kinematic rigidbody and depending on your scale, your speed is probably too low to either be noticeable or to overcome your drag or other factors. Forces don't actually represent speeds directly, but force applied and that's why they have to be much larger. With a force of 40, your object should achieve a speed of 4 units forward initially. Try something like 400 or 4000. If you want to force the initial speed and direction, you could also use