Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

oncollisionenter

OnCollisionEnter(Collision collision)
{
	ContactPoint contact = collision.contacts[0];
    Quaternion rotation = Quaternion.FromToRotation(Vector3.up, contact.normal);
    Vector3 position = contact.point;
    Vector3 relativeVelocity = collision.relativeVelocity;
}
 
PREVIOUS NEXT
Tagged: #oncollisionenter
ADD COMMENT
Topic
Name
4+2 =