Bone Positioning

I added functions so you can spawn a skeleton model and set the bone positions.

Here I am creating a new entity and copying the bone positions from the spawning player. These aren’t ragdolls, they’re just model entities.

        for ( int i=0; i < BoneCount; i++ )
            var tx = GetBoneWorldTransform( i ); // Get player bone
            ent.SetBoneTransform( i, tx ); // Set entity bone

Looks really cool! Are you planning to add full bone manipulating (adding/remove/etc) to s&box?

Also; the model in the air flickers in and out of view a few times, any idea why?

I don’t know about adding/removing bones - what would the purpose of that be?

Yeah I think the bounding box is in the wrong place… I need to update it after bones have been messed with.

Adding capes, and tails… yikes

That’s sick.

I thiink you’d just bonemerge a new model onto the entity, you don’t really need to mess with adding new bones


you would just attach child objects to a bone with a local transform or add attachment points if we have them

Full bone manipulation would allow creating skeletons during gameplay;- think of things similar to PAC (not just attaching clothing) but more exhaustive in actual character creation. I suppose you’ll be able to reach something similar by using bonemearges, but that would be closer to a workaround than anything else.

Basically using s&box as a basis for actual content creation rather than just a platform for games.

As far as I’m aware isn’t pac just attaching props to an existing skeleton? You could create your own skeleton but then you have to also assign vertex weights. So yeah it’s possible but it’s something that would be better suited in modeldoc and not in game. Full bone manipulation you can do in game but there’s no need to change the actual skeletal hierarchy.


PAC is just adding props, I was referring to the more general “character creation” while playing aspect, there’s a bunch of creative communities that just sit around making playermodels ingame. Something similar but more powerful will be great in s&box, and runtime bone tools would be a great step in making that good.

Awesome! That’s basically exactly what I want, good to know it’s already a thing :slightly_smiling_face:. Thank you for the response!