Pushing Rigidbody with physics

Hi,
I’ve been looking around but can’t find any solution or discussion around a thought I’ve had. To put it very simply I would like to push a rigidbody object let’s say a box, up into the air by moving a platform or extrude a piston with some force that would send the box on top of the platform in the opposite direction (flying into the air).
I’ve created some high quality paint pictures to try and visually explain my thoughts as well.

I’ve tried solving this by using automation which doesn’t work. It moves the platform but the box clips through the platform which isn’t that weird considering it uses transform.position.

I’ve also thought about just using the addforce method to the box which would send it into the air but that has nothing to do with the movement of the platform so not really the approach I am going for.

Is there any good solutions to this problem?
Thanks :slight_smile:

I think you should just have to make sure the box has Box Collider and Rigidbody components (include enabling “use gravity” checkbox) and give the platform it’s on a Collider - then move the platform up.

I can assure you that is already done.

Solved.

If anyone else stumbles on this thread i made it work by also having a Rigidbody on the platform and checking “is kinematic” then moving the platform with Rigidbody.MovePosition method.

1 Like