How can I determine a bone's index with its name?

I’m attempting to attach a particle emitter to a skeleton, and am having some hiccups. Specifically, I can’t seem to attach the GPUParticleEmitter3D to an actual bone, that I can see.

This should still be trivial, but all of the Skeleton functions require a bone’s index, and as far as I can tell, I can’t get that easily. Can someone help me figure this out, or at least provide a link to some relevant documentation?

The Godot docs have been a little obtuse so far.

ImpossibleRubiksCube, (edited )

Oh wait. It’s “find_bone”, isn’t it. That’s def a step away from the “get_bone” naming standard, but if it works I’ll take it!

I’m still curious as to whether there’s an easier way to do this than simply updating the global position, by script, to match the pose’s.

Ti_Ka,
@Ti_Ka@lemmy.blahaj.zone avatar

I’m still curious as to whether there’s an easier way to do this than simply updating the global position, by script, to match the pose’s.

I’m not sure if this is what you want but maybe you could use the BoneAttachment3D Node?

ImpossibleRubiksCube,

That looks freakin’ perfect, thank you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • [email protected]
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • TheResearchGuardian
  • Ask_kbincafe
  • KbinCafe
  • feritale
  • Socialism
  • oklahoma
  • SuperSentai
  • KamenRider
  • All magazines