Jump to content
logix1390

Control Pyro based on vex rules

Recommended Posts

hello,

I have a simple smoke sim and I am curious to know how I would set my drag based on the height of my pyro in dops.

I thought maybe I could use a clamp function in dops with the gas field wrangle...or perhaps the drag node would let me set some rules, but i does not

I am familiar with sop solvers when using bullet but when it comes to pyro I am lost when I want to control my pyro in a little more advanced way. Like what if I wanted my smoke to dissipate based on a proximity to something ?

Any help in the right direction would be greatly appreciated.

I will attach my scene for anyone that wants to take a look.

Thank you. 

drag_based_on_y_pyro.hip

Share this post


Link to post
Share on other sites

you can use the fit function for that:

float drag = fit(@P.y,0,10,0,0.1); // zero drag at y=0, drag or 0.1 at y=10
v@vel *= 1-drag;


if you want to clamp the velocity it's a bit different:

float maxspeed = fit(@P.y,0,10,100,1); 
v@vel = normalize(v@vel)* min(length(v@vel),maxspeed);



 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×