Jump to content
foible50

Orient / Lookat for Bullet Objects?

Recommended Posts

Hi,

 

I'm hoping someone can help me as I've spent too long on trying to work this out by myself now. I'm doing a simulation with balloons and want to have them start in randomised orientation and then slowly resolve their orientation to have the wider bit at the top.  This seems to be possible with POP spin for particles, but I can't work out how to do it with bullet.  

So far, I've tried altering the orientation manually in a wrangle in dops and trying to find a way of getting a vector into dops, such as with normals, to then be able to compare to an up vector and add in angular velocity until they match. Altering the orient attribute in DOPs seemed to do nothing if you target it directly, so perhaps it needs to be worked on the intrinsics??  Nothing I tried seemed to work, so I'd love to know if there's a way of achieving this, so would be grateful for any help.

Many thanks!

 

Toby

Share this post


Link to post
Share on other sites

Yeah you're right, you need to adjust the intrinsics. If you've already got the orient attribute figured out, you can just convert it to a matrix3 using qconvert() and then set the primitive intrinsic:

matrix3 m = qconvert(p@orient);

setprimintrinsic (0, "transform", @ptnum, m, "set");

You could do this in a Geometry Wrangle or a SOP solver.

 

Share this post


Link to post
Share on other sites

Thanks so much!  I'll be back on this tomorrow so will give it a go then, but really appreciate your response.  Also, have found bits of your blog a great help in the past, so good opportunity to say thanks for that too!  All the best,

Toby

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

×