Search Unity

Rigidbody curve help needed

Discussion in 'Scripting' started by UNITY3D_TEAM, Nov 28, 2012.

  1. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    I USED rigidbody.addforce method
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class test : MonoBehaviour {
    6.     void OnCollisionEnter(Collision other)
    7.  {
    8.  
    9.       rigidbody.AddForce(0, 10, 0);
    10.  
    11.  }
    12. }
    13.  
    but im not getting curve like object falling.it travels like angular force


    but now i want to make the object move like a curve after collision.pls help me to do this.i have
    attached image for reference.
     

    Attached Files:

    Last edited: Nov 28, 2012
  2. Whatbadguy

    Whatbadguy

    Joined:
    Apr 10, 2011
    Posts:
    165
    Add a small force in the direction you want your ball to bounce... for example (0,10,2)
     
  3. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    thanks .u helped me in short and sweet.