bobbybob Posted November 23, 2018 Share Posted November 23, 2018 Is it possible to control the activation parameter of a POP Drag, based on the position of a RBD Packed object? I am trying to activate a POP Drag, when a RBD Packed object is under a specific Y position. Quote Link to comment Share on other sites More sharing options...
3dome Posted November 23, 2018 Share Posted November 23, 2018 don't know if that parameter takes an expression, feel free to try, but you can always tick on use VEXpression and do things like airresist *= @P.y < some-value; Quote Link to comment Share on other sites More sharing options...
bobbybob Posted November 23, 2018 Author Share Posted November 23, 2018 (edited) @3dome, Is the "*" a way to reference all points? Because it's a RBD Packed, there could be more then one object? In a pop wrangle it would look like this Quote if (@P.y < -5) i@activationState = 1; else i@activationState = 0; Because it iterates over all the object, we could just reference the object we need to look at. But in the pop drags parameter, there is no way to know what object we are referring to... Is there a way to use something like the "point" vex function, to tell it to look at the position of "object 1"? Maybe I just don't understand the "*= @P.y" expression, can you elaborate? Edited November 23, 2018 by bobbybob Quote Link to comment Share on other sites More sharing options...
3dome Posted November 23, 2018 Share Posted November 23, 2018 sorry for the confusion caused by my lazy coding style airresist *= @P.y < some-value; is actually the same as if(@P.y < some-value) { airresist = airresist * 1; //keeping airresist at whatever level it's set } else { airresist = airresist * 0; //turning it off as (something * 0) = 0 } x *= y is just short for x = x * y, it has nothing to do with objects. Pop drag will act on all objects unless you set a group or play with the VEXpression Quote Link to comment Share on other sites More sharing options...
bobbybob Posted November 23, 2018 Author Share Posted November 23, 2018 @3dome, Ahh of course, the pop drag is instanced on every object. I thought it as a global value. Thank you so much, hurray for vex 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.