29-06-2022, 03:10 PM
Hi,
how can I change the transform position of a control point from script?
how can I change the transform position of a control point from script?
Rope Control Points
|
29-06-2022, 03:10 PM
Hi,
how can I change the transform position of a control point from script?
29-06-2022, 04:02 PM
(29-06-2022, 03:10 PM)charlotte Wrote: Hi, 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
29-06-2022, 06:50 PM
(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).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?
30-06-2022, 09:44 AM
(This post was last modified: 30-06-2022, 09:44 AM by josemendez.)
(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 |
« Next Oldest | Next Newest »
|