Jump to content

Houdini 2D Dynamics


stk

Recommended Posts

Hello everyone,

 

I've been researching 2D physics simulation in Houdini, as opposed to using, say, After Effects with the Newton plug-in. I went straight to Bullet knowing that the engine has been used in 2D platformers, and it turned out that constraining all movement to the XZ plane is quite a straightforward process in C++:

rigidBody->setLinearFactor(btVector3(1,0,1));
rigidBody->setAngularFactor(btVector3(0,1,0));

However, I couldn't find the equivalent settings for the Houdini implementation. Blender, for example, has the Location Constraint Actuator which can do the equivalent of the code above. Have I missed something in the Bullet data/solver? Also, how would you approach the problem if you were tasked with creating a 2D simulation in Houdini? I'd appreciate any and all advice!

Link to comment
Share on other sites

  • 5 years later...
  • 1 year later...

Its not the most beautiful solution, but seems to work: 2Dbullet.hiplc

would be interesting to see how well this works with constraints.
To fix the rotations for a "true" 2D look I'd have to decompose the packedfulltransform. I'll have a look at that tomorrow.

2Dbullet.thumb.gif.6e161da008c9964929c209b8ead5d8c6.gif

Edited by nuki
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...