Boxcollider 2D

It’s a “cube” collider when using boxcollider2D. The “cube” item will gradually slide off as the player hops on it, but I’m not sure how to solve that. Or is there a simpler method to prevent an item from colliding with a cube?

I considered creating a top collision game object and angling it with a box cast.

try adding physics to the object then increasing the weight to stop it from slipping thats one easy way to do it

If the cube is never going to move, then remove the RigidBody2D from the object. If it needs a rigid body for other reasons, you can set the type to Static or you can use the Constraints to freeze the X and/or Y position.

Sans112’s answer of increasing the cube’s mass in the RigidBody2D can also be a quick solution.