Jump to content

Orient / Lookat for Bullet Objects?


foible50

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

Link to comment
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.

 

Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...