Obi Official Forum
Help How to set the length of the rod - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help How to set the length of the rod (/thread-2697.html)



How to set the length of the rod - Mingrui - 13-01-2021

I'd like to create a rod whose length is 0.2m. I wonder how to set the initial length of the rod, and I don't need to change it in run time.
Thank you very much.


RE: How to set the length of the rod - josemendez - 13-01-2021

(13-01-2021, 08:49 AM)Mingrui Wrote: I'd like to create a rod whose length is 0.2m. I wonder how to set the initial length of the rod, and I don't need to change it in run time.
Thank you very much.

You can set both the shape and the length of the rod by clicking the "edit path" button and editing the curve that defines its shape. See:
http://obi.virtualmethodstudio.com/tutorials/ropesetup.html


RE: How to set the length of the rod - Mingrui - 13-01-2021

(13-01-2021, 08:51 AM)josemendez Wrote: You can set both the shape and the length of the rod by clicking the "edit path" button and editing the curve that defines its shape. See:
http://obi.virtualmethodstudio.com/tutorials/ropesetup.html
Thanks for your help. 

Another question: What does the white line (especially the middle vertical line) mean? Does it control the distances between particles? (screenshot is attached)


RE: How to set the length of the rod - josemendez - 13-01-2021

(13-01-2021, 10:53 AM)Mingrui Wrote: Thanks for your help. 

Another question: What does the white line (especially the middle vertical line) mean? Does it control the distances between particles? (screenshot is attached)

I can't see any screenshots attached.

I guess you refer to the white lines that serve as guides for the shape of the rod. They let you visualize the centerline, orientation and thickness of the rod. Particle distance is not visually represented, you can just add a ObiParticleRenderer component to the rod to visualize them. See:
http://obi.virtualmethodstudio.com/tutorials/particlerendering.html


RE: How to set the length of the rod - Mingrui - 13-01-2021

(13-01-2021, 10:57 AM)josemendez Wrote: I can't see any screenshots attached.

I guess you refer to the white lines that serve as guides for the shape of the rod. They let you visualize the centerline, orientation and thickness of the rod. Particle distance is not visually represented, you can just add a ObiParticleRenderer component to the rod to visualize them. See:
http://obi.virtualmethodstudio.com/tutorials/particlerendering.html
Sorry, the screenshot is attached here.


RE: How to set the length of the rod - josemendez - 13-01-2021

(13-01-2021, 11:01 AM)Mingrui Wrote: Sorry, the screenshot is attached here.

The lines are just meant to give you a basic feel for the shape of the rod and its orientation. In a straight, uniform thickness rod, they won't seem like much. But they will really help once your rod has a shape like this:

[Image: ItjK1aX.png]

Just from the lines alone you get a lot of information: the rod is thicker in the middle region, it twists near the right end, and you get the "up" local orientation.

From particles, you would not be able to visualize any twisting or orientation. Sure enough, this is what the rod looks like when rendering it with a textured mesh:

[Image: lKLntZN.png]