Can I make an object move in the direction my avatar collides with it?

I’m trying to make a Sokoban game in which the player can push heavy boxes across the floor. I’ve been able to get a box to move one position along one axis when the player collides with it, but I can’t figure out how to generalize it so that the box’s movement is dependent upon the direction from which the player collides with it. Is there any way to do this currently? Or is there any physics implemented that allow objects to be pushed by the player?

you can add rigidbody to the box.

I tried both Rigidbody and Physics, but nothing happens when my Avatar collides into it. I’ve tried putting my box above the floor to see if gravity affects it; it doesn’t. I’ve tried moving another rigid body into it to “wake up” the physics, but two rigid bodies just pass through each other. Both bodies have triggers and collision boxes.

Then its most probably due to the rigidbody bug that came with the latest update. Devs are already aware of it.

has it been patched yet? im having trouble also

Use a script to listen for a collision event on the model. Get the user’s position and and then use SetTargetPosition(float3 position) and Start() on the mover component to move the model in the opposite direction of the player. I think that would be straight forward to set up!