[SOLVED] After setting entity's position, rigidbody no longer works

I have an entity with a box model, box collider, and rigidbody.
I have a small plane with a box collider.

I position the box “high up in the air” over the plane.
When I run the game, the box falls and lands on the plane. Perfect.

I position the box “high up in the air” but not over the plane.
When I run the game, the box falls, misses the plane, and falls forever. Perfect.

Now, I put the box back where it will hit the plane when it falls.
I let it fall and land on the plane.
Then using a drag and drop script, I set the entity’s position to a vector where a raycast from the camera, and a new plane emitted from the box itself (pc.Plane) collide. The entity is now set to the new position, like any drag and drop system.

PROBLEM!
When I drag the box off the plane, where it should fall off the “world” into infinity, it does not fall! It appears that the rigidbody no longer works! After using “this.entity.setPosition(this.hitPosition);” to drag the box, it seems like the rigidbody is dead. Gravity no longer affects it. I’m really not doing anything other than using setPosition…

What could be wrong?

If an entity has a rigidbody, you should use teleport:

2 Likes