07-01-2021, 09:55 AM
(This post was last modified: 07-01-2021, 09:57 AM by josemendez.)
(07-01-2021, 09:18 AM)MonaGermany Wrote: Hello!Hi there,
I want to add the Obi Rod Blueprint to the Obi Rod in a Script, is this even possible?
The reason is, that I manipulate the Control Points in the Blueprint, depending on which case I have.
And when I add the Blueprint first to the Rod, then the manipulation of the Control Points in the general Obi Rod Blueprint Script has no effect anymore…
Or is there a way to change the Control Points in Script afterwards?
Thank you in advance for your help!
Greetings
Mona
You can create/modify blueprints at runtime, create/modify curve control points, and assign the blueprint to a rope at runtime. It's explained in detail (with sample code) here: http://obi.virtualmethodstudio.com/tutor...ctors.html
Don't expect to be able to modify existing ropes by changing their blueprint after it has been instantiated, though.
Just to make things clear: once you instantiate an actor, it is no longer tied to the blueprint in any way. Blueprints act as a "instruction manual" for the actor to know were to place particles and how to interconnect them using constraints. In this regard, they act just like prefabs: once you instantiate a prefab, modifying the prefab has no impact on the existing instances.
Control points only exist as a way to easily define a curve along which to place particles and define the rope's rest shape. Neither the curve nor its control points have any impact on existing ropes once their simulation has begun.