Some collision related problems

Well hi, I’m trying to make a game following this concept: every time you click the player jumps straight up on a platform that moves into the view. If you land on that platform, the platform you landed on stops moving and another one comes. now I basically have two box colliders on the cube, and one which is edited so it only has the bottom part and it is set as a trigger. But now the problem is, the platform instead of just hitting the bigger collider from the side, it goes through the cube and stops moving when it reaches the small trigger collider.

So I added a rigidbody to all of the platforms. They now push the player cube around, but when my cube lands on them they don’t stop moving.

Okay, so for optimal collision detection. You want one of the objects to have a rigidbody.
Next give one of the objects a collider with a trigger (this will not be affected by physics, it will only detects when it collides with another collider. Next attach your colliders and set them as NOT trigger and these are the ones that will bump against each other and NOT pass through.


Rigidbody: for physics like gravity and making sure things get detected.

Collider Trigger: NOT for physics, only for detecting if an object passed through it.

Collider (without Trigger): Barrier that repels other non-trigger colliders or rigidbodies NOT set to "Is-Kinematic.