Obi Official Forum
Rope Control Points - 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: Rope Control Points (/thread-3513.html)



Rope Control Points - charlotte - 29-06-2022

Hi,
how can I change the transform position of a control point from script?


RE: Rope Control Points - josemendez - 29-06-2022

(29-06-2022, 03:10 PM)charlotte Wrote: Hi,
how can I change the transform position of a control point from script?

Control points do not exist during simulation, they’re just a helper to define the initial rope path (blueprint).

You can use attachments to “glue” parts of the rope to transforms, then during sinulation you can move the transforms as usual.

If you’re creating blueprints entirely at runtime, check the scripting section of the manual and the API:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingactors.html


RE: Rope Control Points - Luke_ - 29-06-2022

(29-06-2022, 04:02 PM)josemendez Wrote: Control points do not exist during simulation, they’re just a helper to define the initial rope path (blueprint).

You can use attachments to “glue” parts of the rope to transforms, then during sinulation you can move the transforms as usual.

If you’re creating blueprints entirely at runtime, check the scripting section of the manual and the API:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingactors.html
Is there a way to make the assigned Particle group position exactly equal to the target's position when a target is assigned to the rope during gameplay? Just like in the game Tailor Master?


RE: Rope Control Points - josemendez - 30-06-2022

(29-06-2022, 06:50 PM)Luke_ Wrote: Is there a way to make the assigned Particle group position exactly equal to the target's position when a target is assigned to the rope during gameplay? Just like in the game Tailor Master?
You can set any per-particle property at runtime, including particle positions. See:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

Simply set the position of the attached particle right before assigning the target. Remember that all particle data is expressed in the solver's local space, so you will need to transform the target position to solver space.

If the target is a collider, make sure that the rope does not collide against it since it's going to be attached inside of it and this will cause constraint fighting. You can solve this by appropriately setting collision filters, see "attachments inside colliders" at the end of the following page:
http://obi.virtualmethodstudio.com/manual/6.3/attachments.html