AddForce physic Problem

Hey Guys, I need a little help

i am using Addforce to move the forks of the Forklift.
the problem that i cant resolved is how to stop the forks.
i cant use in the rigibody because i need to drive the forklift.
this also ruled out.

when i press the up button. i apply addforce to the florks. but when i release the button with the weight of the load the forks decended.
I need to stay in position when release the button.

function Start() {
    rb = GetComponent.<Rigidbody>();
    }

function SubirBrazo (){
   
    while(botonUpOn){
           
            rb.AddForce(Vector3.up * thrust);
           
            }

I appreciate any help

Do you need a rigidbody for that part? You can just move the collider (if it’s a child of the forklift). Alternatively look into ForceMode (the missing parameter in AddForce).

1 Like

Have you looked at ‘Fixed Joint’? It seems to be just what you are looking for.

i cant use “fixed Joint” because i cant move the florks up and down.

You would have to turn on the fixed joint when the button is released.

1 Like