Hi guys, I am making a game where a player can walk up walls and on ceilings. I have a player with a rigidbody and am freezing the rotation. I have an FMS for keeping a constant -y self force and moving the player forward with a z force. I also have this code that always keeps the bottom of the player aligned with the ground using a raycast and it works fine (always keeps the transform rotation flush with the floor). But I can not get it to work in playmaker. I downloaded all the custom actions required off the website (Quaternion.LookRotation, Transform.right) but just can't get it to work. Can anyone help? Thanks!
if (Physics.Raycast (transform.position, -transform.up, out hitDown, 2))
{
transform.rotation = Quaternion.Lerp (transform.rotation, Quaternion.LookRotation (Vector3.Cross (transform.right, hitDown.normal), hitDown.normal), Time.deltaTime * 5.0f);
}