If you want to automatically add Unity components to your HDA's output gameobjects, then you can easily do that by creating a detail string attribute to your geometry with the name “unity_script”, with the value being the name of the component. Multiple components can be specified as well, and these components can be anything from built-in Unity components like Colliders, Animators, etc., to your own custom Components.
Attached is a simple HDA that takes in an input geo, and assigns a BoxCollider component to the output.
More info here: https://www.sidefx.com/docs/unity/_unity_scripts.html [www.sidefx.com]
Tip: Easy way to add components and colliders to outputs
3233 3 2- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
- Benjamin Lemoine
- Member
- 143 posts
- Joined: Oct. 2015
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
Currently the easiest way to do this is to call your own custom script and function to add the box collider with the parameters for size. I'd presume for most projects, folks might have their own wrapper components around colliders and other native components anyway.
Or wait until next daily build because I just added support for Houdini box and sphere geometry types to be automatically converted to Houdini colliders with size and centre position. The attached HDA provides an example of using a sphere SOP as render geometry, and box SOP as collider geometry using the “collision_geo” group naming: https://www.sidefx.com/docs/unity/_attributes.html#AttributesGroups [www.sidefx.com]
Or wait until next daily build because I just added support for Houdini box and sphere geometry types to be automatically converted to Houdini colliders with size and centre position. The attached HDA provides an example of using a sphere SOP as render geometry, and box SOP as collider geometry using the “collision_geo” group naming: https://www.sidefx.com/docs/unity/_attributes.html#AttributesGroups [www.sidefx.com]
- Benjamin Lemoine
- Member
- 143 posts
- Joined: Oct. 2015
- Offline
Ok , thanks for the answer !
In fact i was looking for adding proceduraly some hinge joint
for doing a procedural Chain asset with each joint automatically joint to the next link….
I have already a custom made chain asset in Houdini , so i was looking to some way to use it in houdini engine
It would be great for simple stuff witch work well with bullet , it could work well also in Unity i think !
I will test your demo file ASAP
Thanks !
In fact i was looking for adding proceduraly some hinge joint
for doing a procedural Chain asset with each joint automatically joint to the next link….
I have already a custom made chain asset in Houdini , so i was looking to some way to use it in houdini engine
It would be great for simple stuff witch work well with bullet , it could work well also in Unity i think !
I will test your demo file ASAP
Thanks !
-
- Quick Links