Simple thing… I’m using the built in 3rd person character controller, and I want my character to walk up a see saw that will flomp down when he gets half way…
The see-saw I just added a Rigid Body and its seems to work, in so much as it wobbles on its fulcrum before dropping to one side (the heavier side). But when my character ambles along the See Saw (that also has a rigid body attached, ) it does not flomp down as expects when he gets half way…
I have seen this exact thing handles in the Wiki for a FPS controller (havent tried it yet… but is there a simple way to get this working?
The CharacterController doesn’t behave like a rigidbody (it doesn’t apply a weight force to the seesaw) - but you could do this with a little scripting (attach to the character):
var weight: float = 10;
function OnControllerColliderHit(hit: ControllerColliderHit){
if (hit.rigidbody){
hit.rigidbody.AddForceAtPosition(-Vector3.up * weight, hit.point);
}
}
This code will push down any rigidbody the character touches, like the weight force would do. You may have to tweak the weight or the seesaw mass to have a more consistent behaviour, and probably the seesaw should have a hinge joint at the fulcrum to not slip away.
If you change the -Vector3.up to -hit.normal, the character will push away any rigidbody touched.