Move Rigidbody frictionless over ground

Hey!

Im currently working on a simple maze game where a triangle is moving over a ground and colliding with stuff (camera from top). I came up to the conclusion that I want to use gravity on this triangle and not a kinematic rigidbody (as it was before). This because I want it to fall off the ground if it comes to near the edge of the ground plane. The problem is, however, that I want to move it frictionless so the object doesnt roll over when moving forward.

I thought about using raycast, and just change the y position to something above ground. Is this the right way of doing it? If it is, does someone have an example, as I don’t have worked with raycasting before.

Best regards

The best way would be in my opinion to use the built in physics engine with a non-kinematic rigidbody, as you suggested. Getting rid of the friction is not a problem, simply create a new physics material that has 0 friction, and use it as the physics material for your triangle.

You can find more information on creating and using physics materials in the following links:

http://unity3d.com/learn/tutorials/modules/beginner/physics/physic-materials