|
Hey Unity Answers Users... I'm here today with a script and a problem. I need to find a way to add force to a projectile fired at another object. I need it to be in a curve fashion (Catapult Effect). Here is my script: #pragma strict var sProjSpd : int; var sProjDir : Vector3; var targetP : GameObject; function OnEnable() { } function Update() { if(Input.GetKeyDown("space")) } Any help would be great. I have dabbled in putting addforce and forcemode.impulse but they seem not to work. Regards, Trent
(comments are locked)
|
|
To use rigidbody.AddForce successfully you must have a non-kinematic rigid body on the object and have no other scripts change the positional properties of the object. Multiply the direction with the impulse strength.
(comments are locked)
|
