- Home /
How to make dominoes topple?
We are trying to setup a scene where dominoes topple but are not able to initiate the chain. We tried add.torque but it doesn't seem to work, maybe there's some problem with the script. We also tried transform.rotate which works fine but after falling keeps on vibrating on the plane.
I assume that you have attached rigidBodies to them? then you could just make a cube with a rigidbody, turn the mesh renderer off and fire it at the top of a do$$anonymous$$o
@Sagar96 Have you found a solution to your question?
Answer by JoshKingsbury · Sep 13, 2014 at 09:58 PM
Try adding this script to the first domino, correcting it for the strength and desired axis of rotating along which you would like the torque to be applied:
using UnityEngine;
using System.Collections;
public class AddTorque : MonoBehaviour {
// This determines the strength and direction around the selected axes in which the torque is applied
float torqueStrength = -25.0f;
// Use this for initialization
void Start () {
// Modify this code for the Vector3 to be the axis you want to torque to be applied around (local to the domino)
rigidbody.AddRelativeTorque( Vector3.right * torqueStrength );
}
// Update is called once per frame
void Update () {
}
}
Answer by Kiwasi · Sep 13, 2014 at 10:00 PM
Typically you push the first one over and let physics do the rest. RigidBody.AddForce would be the unity equivalent.
Your answer
Follow this Question
Related Questions
getting out of LookAt messes up first person view 1 Answer
Unity3d - Transform rotation(angle) help 1 Answer
Using euler angles to rotate causes the object to get stuck on the x axis? 1 Answer
2D Rotation to target? 0 Answers
Rotation roadblock 0 Answers