- Home /
Rolling a 3D triangle
Hello,
I have spent countless of hours to make a triangle roll with and without physics. I want to make a 3D triangle roll forward, without any edges goes into the ground while rolling forward, but can't find a way. I have tried putting a sphere collider on all edges, mesh collider on the triangle, I have tried so many things. I am currently using a very simple script.
Does anyone have a solution for this? private void Start() { myRb = GetComponent();
}
void FixedUpdate()
{
transform.Rotate(transform.right * speed, Space.World);
myRb.transform.Translate(0, 0, speed * Time.deltaTime, Space.World);
First of all what is a 3d triangle? A triangle is a 2d shape. The 3d equivalent of the triangle would be the tetrahedron which however would be difficult to "roll forward" if you actually want it to tip around it's edges.
$$anonymous$$aybe you meant a triangular prism?
If you actually want it to rotate around the touching edge (of whatever shape you meant) the movement won't be linear as the center of the object would be going up and down during rolling. Though it's pointless to continue talking without clearing up what we actually talk about.
$$anonymous$$aybe a full sphere collider for all of the triangle shape?