How can a player push an object?

public GameObject player;

void OnCollisionStay(Collision player)
{
GetComponent().Addforce (new Vector3 ( 0, 0, 0));
}

It works but then it didn’t work for some reason, could you tell me why. And I want to know a direction that can push an object anywhere in the direction.

@GraceBelt123

Hello!

To push an object, add a rigid body to the object and make the mass to 1 and put the mass of the player to like 100 then the object will be pushed by the player

it is not working, I can’t seem to push an object. I did with Player mass 100 and an object mass 1.

try increasing the velocity or speed of player and decreasing the drag of object to push.
Hope it helps.

Changing the physic material of the floor worked better for me. Setting Dynamic and Static Friction to 0.1 and setting Friction Combine to multiply works good even if the mass of the player is the same as object’s.

Make sure that isKinematic is not checked and isTrigger on your collider is not checked.
Both the player and the object need a rigidbody.