ScriptSpot

Forum topic · Scripts Wanted

how to lock rotation by limit code

By Budi G · 2010-01-17

Downloads
Description

Hi, how to lock rotation by limit code without IK solvers if I moving or rotating the bone ?

Any suggest about it ? perhaps by script or controller script ... thanks

sample in this case like rotate bone hand/fore arm character

Comments (2)

Anubis · 2010-01-18

quick theoretical code scheme:

if currVal < minVal then minVal
else if currVal > maxVal then maxVal
else currVall

thank you anubis :)

Budi G · 2010-01-21

I see your point ... that's interesting one.
can you give me 1 sample script how to apply to the target object ?

oh yes, about my case... I have resolve the problem by myself, I just tried to assign float limit controller.
here the script :
$.rotation.controller.Z_Rotation.controller = float_limit upper_limit:0 lower_limit:-2.5 -- Z Rotation