Quantcast
Channel: Answers for "Constant force"
Browsing all 4 articles
Browse latest View live

Answer by Ludiares

var hit = false; function OnCollisionEnter(collider : Collision) { hit = true; } function Update() { if(hit) { rigidbody.AddForce(transform.forward * 10 * Time.deltaTime) } }

View Article


Answer by SilverTabby

There are two ways to change the gravity affecting an object: You can change the Physics.gravity constant to affect all objects or you can add gravity by hand Editing [Physics.gravity][1] is simple...

View Article


Answer by Ludiares.du

var hit = false; function OnCollisionEnter(collider : Collision) { hit = true; } function Update() { if(hit) { rigidbody.AddForce(transform.forward * 10 * Time.deltaTime) } }

View Article

Answer by SilverTabby

There are two ways to change the gravity affecting an object: You can change the Physics.gravity constant to affect all objects or you can add gravity by hand Editing [Physics.gravity][1] is simple...

View Article
Browsing all 4 articles
Browse latest View live