I have an gameobject that is a car and that game object has a scripts attached named AxisCarController which is the car controller. So when the player walk to a opened car door (when is in the front of the car body location where is the door) the player will need to walk and jump and after the player will crounch and a little text will appear down ‘ENTER’ if the player press enter key on keyboard will remain locked into the position where pressed enter (inside the car) and that car controller script will get enabled. Now if it press enter one more time the character will be unlocked and can exit the car. And also I have a question. Did I need to use transform pivot points for this?
The way I would do this is to disable/hide your player when he enters the vehicle, then enable and reposition the player when he exits (maybe looking outwards from the car). I understood you want your character physically sitting inside the car. Then you need to place him there in a driving posture, or use separate body object without character controller.
How to do it? It’s not clear if you’re 2D or 3D or whatnot.
Get a driver posture for your guy, place him on the seat and set IKs. Then easiest is if you just use a dummy copy of your character model while he is driving, because you don’t want to use your character controller movements. When he enters the car, switch off your character controller and enable the dummy.
But how can I make a transition effect like when player goes to the opened door and jump will crounch and enter inside the car and goes back to it’s original position when exiting