jetmouse If you want to start with very basic information, the section starting at 02:58 in the following video may be helpful:
There are not many examples of C++ in the example project, but each section of the spine-ue documentation always explains both how to do it in Blueprints and how to write it in C++ code, so it would be a good idea to use the C++ script in the example project as a base and modify them according to the documentation:
https://esotericsoftware.com/spine-ue#Skeleton-Component
I'd also like to mention that I've created a complex health bar HUD, which requires a percentage or position value ranging from 0 to 100. How can I achieve this in Unreal Engine C++
Based on your description, instead of directly changing the position value, you may want to create an animation that only animates the position value of a path constraint between 0 and 100, set that animation with the Time Scale
of 0, and then advance the Track Time
using the TrackEntry
object. You can do this with Blueprints for this approach.
Here is an example Event Graph: Set the jump
animation with TimeScale 0.0, and only when the "A" key is pressed will the track time advance by 0.1, then update the world transform:
The result is here:
I think a similar mechanism should be able to make the health bar change under certain conditions. I hope this helps.