I’m trying to make a box moving in a conveyor belt, so I read on a different thread that I should set the box rigidbody velocity (or apply a force) using OnCollisionStay.
The problem I have is that when I run the code, the box instead of moving on the ground, starts rotating.
Is this some problem with friction?
[21519-sin+título.png|21519]
This is the code I’m using…
void OnCollisionStay(Collision collisionInfo) {
collisionInfo.rigidbody.velocity = 10 * transform.right;
}