MadMax50 Posted April 3, 2021 Share Posted April 3, 2021 Hello, Is there a way to make a pyro sim travel at a constant speed. I tried to clamp the vel but I dont think im doing it correctly. In a gas field wrangle I am writing this: v@vel.y=clamp(@vel.y, -.5, .5); v@vel.x=clamp(@vel.x, -.5, .5); v@vel.z=clamp(@vel.z, -.5, .5); I think its working but I was wondering if there was a better way to achieve this I will attach my hip file Thank you clamp_vel_pyro.hip Quote Link to comment Share on other sites More sharing options...
bunker Posted April 3, 2021 Share Posted April 3, 2021 // clamp speed v@vel = normalize(v@vel)*min(length(v@vel),chf("max_vel")); 1 Quote Link to comment Share on other sites More sharing options...
MadMax50 Posted April 3, 2021 Author Share Posted April 3, 2021 @bunkerMuch better solution, Thank you !! 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.