Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Best way to pre-bend this rod?
#2
(15-01-2024, 07:17 PM)bad.penny.games Wrote: I am using a rod as the hose on this vacuum cleaner. I want it to be curled like below when the scene loads. When I try to "pre-bend" the control points it goes wrong one way or another, usually by falling off the "start" transform.

Overall I would prefer to just snapshot the hose and current state in some way without having to edit control points (basically the way we do for physics objects in the scene, we hit Play, then we copy the transforms, then we "Paste -> component values" to have the object settle where it should be). So is there a one-or-two click way way to do this for an Obi Rod object?   thanks in advance -- ian

Hi!

The intended way to do this is using the path editor. Note you can add a ObiParticleRenderer component to the rod, this will allow you to visualize the particles in the rod as you edit the path.

At each control point in the path, one particle is guaranteed to be placed, so by placing a control point right at the object’s transform you can make sure the rod doesn’t stray away from that transform.

If you want to use the “snapshot” method instead, you’ll need to write some code that generates a blueprint at runtime by saving current particle positions/orientations, and then stores it as an asset - to be used next time you want to instantiate the rod-. Let me know if you need help with this.

See:
http://obi.virtualmethodstudio.com/manua...ctors.html
http://obi.virtualmethodstudio.com/manua...icles.html

Kind regards,
Reply


Messages In This Thread
RE: Best way to pre-bend this rod? - by josemendez - 15-01-2024, 08:50 PM