center of mass with HOM(VEX)?

   1392   0   1
User Avatar
Member
237 posts
Joined: June 2006
Offline
Hi,

found an interesting file from JOHNNY FARMFIELD

https://vimeo.com/farmfield [vimeo.com]

with name FlipFluid Bullet deformation https://vimeo.com/123758824 [vimeo.com] attached.In the dopnet the RBD_Bullet1 node, in the center of mass is following code:

obj = hou.node(hou.parm(“soppath”).eval())
dopnet = hou.pwd().creator()
if dopnet and dopnet.type().category() != hou.objNodeTypeCategory():
dopnet = None
if obj is None:
return 0
if obj.type().category() != hou.objNodeTypeCategory():
obj = obj.creator()
p = hou.Vector3(obj.parm(“px”).eval(),
obj.parm(“py”).eval(),
obj.parm(“pz”).eval())
tp = p * obj.worldTransform()
if dopnet is not None:
tp = tp * dopnet.worldTransform().inverted()
return tp

as I'm relative new to it, please could someone explain it to me?

Thanks in advance

Attachments:
bullet.collide.v1.hiplc (828.4 KB)

  • Quick Links