So I'm trying to tweak (art direct) a destruction simulation by going into the rbd bulletsolver and adding some forces.
I'm mainly using POP drag,POP dragspin and POP force. You can use VEXpressions to specify in my case where the force should be applied.
Currently I'm doing it manually like this, inside the popdrag VEXpression:
if(@P.x >= 523 && @P.x <= 539 &&
@P.y >= 40 && @P.y <= 43 &&
@P.z >= -187 && @P.z <= -181)
{
airresist = 10.0;
}
else
{
airresist = 0.001;
}
But I would like to make it easier to visualise and change. So I tried adding a box object and using the box bounds to check if a piece is inside the bounds of the box and add the force if it's the case. So I can visually see where the bounds are and change it easily, but I can't get a box in the dopnnet(or reference a box from the geometry level) and don't know how i would even define it in VEX.
Any seggestions on how I would do it?