Masoud Posted May 29 Share Posted May 29 Hi everyone, In a rigid-body simulation, I'd like to break constraints if the RBDs go above 1.5 in the Y position (i.e., @P.y > 1.5). I've added a SOP Solver to the last input of the Constraint Network DOP, but I'm not sure how to access the Y position of the RBDs inside the solver. Any ideas on how to reference the RBD positions correctly? Thanks in advance for your help! Quote Link to comment Share on other sites More sharing options...
fencer Posted May 30 Share Posted May 30 Try to search first, there are many examples how to work with VEX and constraint on odforce or google. https://www.sidefx.com/forum/topic/78398/ https://www.tokeru.com/cgwiki/HoudiniVex1.html https://www.tokeru.com/cgwiki/HoudiniDops.html#constraint_networks Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 31 Author Share Posted May 31 Thank you Quote Link to comment Share on other sites More sharing options...
hannes603 Posted June 2 Share Posted June 2 if(distance>chf('slider') ) { setprimattrib(0, "constraint_name", prim[0], "", "set"); } that usually does it for me Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 6 Author Share Posted June 6 Thank you Hannes Quote Link to comment Share on other sites More sharing options...
paranoidx Posted June 7 Share Posted June 7 (edited) inside SOP Solver you can apply 1 in 2 options: 1. Merge the dop_geometry data into second input for Y position per step of the RBDs (select by name or DOP id to select the animated geo) 2. If the animated RBD geometry ahead at SOP. Use a merge node, merge the animated geo into the SOP Solver Both give you animated Y position of the animated geometry. Input that to 2nd input of the VEX wrangle to apply operation on primitive. Edited June 7 by paranoidx clarify answer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.