Hello OF,
I have a small issue which I hope you can help with...
I am creating attributes at SOP level to control the breaking of constraints in a SOP Solver in DOP's using the
following VEX code in an attribute wrangle connected to 'relationship geometry' of the SOP solver.
if (s@constraint_name == "pin_between"){
if ((f@torque>@break_torque||@angle>@break_angle||f@force>@break_force)){
s@constraint_name = "pin_broken";
i@breakframe = @Frame;
}
}
My issue is that when I disable one of these attributes at the SOP level, the sop solver seems to interpret it at a value of 0, and
the objects constraint will be completely removed on collision.
Is there a better function to use than 'or' in this situation? An 'if else' seems more appropriate, but I am unsure of the syntax of
that in this situation within VEX.
Any help would be greatly appreciated.
Many thanks in advance.