Nice!
The names of the bones in the array can matter - it depends how you set it up. Since you’re just getting started, I’d recommend a setup like this for your dragon:
I think you’ve already got your name array setup something like this - one name per bone you want to place.
I’d recommend making another array variable, but this time it’s an array of rotators.
You’ll make one entry for each bone in your bone list - and they’ll need to be in the same order as the bone list.
You can just fill in your current working value of (180,180, 270) for each of the bones that are working properly. When you get to the tail bones you can try different values.
Then you’ll read off the values you typed in in place of the current (180,180,270).
What this loop is doing is:
- Get the first bone in the name list
- Do some math to figure out where it should go
- New: Get the first rotation in the rotation list
- Set the bone’s location and rotation
and repeat for every entry in the two lists.
FYI - watch out if the two lists end up being different lengths - that’s a common bug for a setup like this, and the engine may or may not start throwing errors. Just something to check if you need to troubleshoot.