add force in camera direction

I’m using this script to make a crate to be pushed strongly in the direction of my FPS camera:

void Update () {
			crate.rigidbody.AddForce(cameraRelativeRight * power);
			crate.rigidbody.AddForce(cameraRelativeForward * power);

when the variables are:

cameraRelativeRight = Camera.main.transform.TransformDirection(Vector3.right);
cameraRelativeForward = Camera.main.transform.TransformDirection(Vector3.forward);

Already tried:

combine the forces in the same term (like this: (cameraRelativeRight+cameraRelativeForward) * power

make it with this variables: = Camera.main.transform;
	this.cameraRelativeX = cam.TransformDirection(Vector3.right);
	this.cameraRelativeZ = cam.TransformDirection(Vector3.forward);

by adding my main camera as “cam”

nothing worked, the crate just pushed wherever it wants…

If you want the crate pushed towards the camera, you need to construct a vector from the crate towards the camera:

Vector3 pushDir = Camera.main.transform.postion - crate.transform.position;
crate.rigidbody.AddForce(pushDir.normalized * power);