Hi,
what would be a good way to limit the rotational component of a freely moveable character?
My character is represented by a Box.
It should be able to climb up hills but it should not fall down sharp cliffs (nor climb them)
So the x&z axis should be limited to lets say -20/20 degree while the y axis should be free, to let him rotate to the wanted direction.
By just attaching a constraint i dont see how to make the above possible.
Any ideas?
limit a character
-
- Posts: 17
- Joined: Thu Nov 01, 2007 2:13 am
Re: limit a character
I would use an invisible plane to block the character from accessing certain areas instead.
-
- Posts: 11
- Joined: Fri Nov 02, 2007 7:08 am
Re: limit a character
Just by attaching a constraint, I don't think so. For not falling down sharp cliffs, yes, an invisible wall is probably your best bet.
-
- Posts: 229
- Joined: Sun Sep 30, 2007 7:58 am
Re: limit a character
Well, this was my first idea but it doesn't work for my case. My player collision is a non-uniform scaled box. The wall approach does only work for uniform scaled boxes.Blairvoyant wrote:Just by attaching a constraint, I don't think so. For not falling down sharp cliffs, yes, an invisible wall is probably your best bet.
Another idea i had was slerping the box quaternion back to the limit as soon a certain degree has been reached. This may work but i guess it will have jitter artifacts.
The real solution would be to make an own constraint that has this behaviour. However, maybe Erwin addresses this problem already in his upcoming character controller?