Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rope Control Points
#1
Hi,
how can I change the transform position of a control point from script?
Reply
#2
(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/manua...ctors.html
Reply
#3
(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/manua...ctors.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?
Reply
#4
(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/manua...icles.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/manua...ments.html
Reply