How can i set point position in Path constraints with code in Unity ?
This is posible ? Thanks.
Set point position in Path constraints
@ninhhongquan You first have to create a bone in the Spine Editor which you bind your path constraint point to. You can test in the Spine Editor if your path constraint point is moving along with the bone when moving the bone around in Animate mode.
Then on the runtime side, you can change the bone location via code as usual. This can be done e.g. via a SkeletonUtilityBone
hierarchy where the desired bone is set to Mode
Override
, or directly via code (using bone.SetLocalPosition()
) as in Spine Examples/Getting Started/4 Object Oriented Sample
on the VIEW Spineboy
GameObject in the SpineboyTargetController
script.
Harald It' works well, Thanks for your help !
@ninhhongquan Glad to hear, thanks for getting back to us!