var direction.x = Input.GetAxis("Horizontal");
if (direction.x)
// direction is a positive value
else
// direction is a negative value
.
But the following doesn’t validate. Is it not possible to compare a number with a bool in this manner?
var userSetting : bool;
if (direction.x == userSetting)
// Both values are either negative or positive
.
// Edit: What I’m trying to do is check whether player is facing the correct direction to grab onto a ledge (Designer sets the ledge side manually) so player cannot grab a ledge with his back.