cond( circle.kine.local.posx > 0, 1, 1 + circle.kine.local.posx )
If “circle.kine.local.posx > 0” evaluates to true, then the cond statement evaluates to the value 1.
If “circle.kine.local.posx > 0” evaluates to false, then the cond statement evaluates to the value 1 + circle.kine.local.posx.
I understand how conditions work :) Just wrapping my head around this that is frustrating me. In the example above I understand that:
0 (greater / less then)- if
1 - true
1 - false
Correct my math if I’m wrong, but if you add +circle.kine.local.posx which is a value of 0 then 0 + 1 normalizes to 0 that is why that must be added if the controller is at 0 it has no effect ?
So, if posx = 2, then you will get 3.
If posx = -1, then you will get 1.
If posx = 0, then you will get 1.
I didn’t understand this part, sorry !
What I’m trying to understand is taking from this tutorial, Part 2 Step 5. My controller that I built has the same coordinates 0,0 (centre) -1,1 (top left) 1,1 (top right) -1,-1 (bottom left) 1, -1 (bottom right) ??
Example of my expression:
cond( <name of my controller>.kine.local.posx > 0, 1, 1 + <same name of controller>.kine.local.posx )
You must add the controller name afterwards just for it to normalize the value back to 0 if the controller is at the centre ("0") ?
Author: FalconCrest
|