So yeah, when I speed up in my car my guy (tic-tac man) goes further and further into the seat despite me setting his position to the seats position each frame. Here is the code at which the position of my character is changed:
void FixedUpdate () {
if(carControlEnabled){
seatTarget = seatPos.transform.position;
player.transform.position = seatTarget;
player.GetComponent<CharacterController>().enabled = false;
player.GetComponent<FPSWalkerEnhanced>().enabled = false;
player.GetComponent<CapsuleCollider>().enabled = false;
Controller();
HandBrake();
} else if(!carControlEnabled){
wheelRR.motorTorque = 0;
wheelRL.motorTorque = 0;
wheelRR.brakeTorque = decelerationSpeed;
wheelRL.brakeTorque = decelerationSpeed;
wheelFL.steerAngle = 0;
wheelFR.steerAngle = 0;
}
}
I have included the full statement in-case you were wondering if anything else could be causing this, if you require some screenshots then just ask me. seatTarget just gets the vector position from the seat GameObject.