[OLD] SmartBone - An optimized module for Dynamically Simulated Bones

Raycasting isnt very effective for large scale realtime physics applications atm due to the complexity of all the backend that roblox does, they are working on optimizing raycasts however I doubt they will ever be fast enough for something with large scale physics

1 Like

Hereā€™s a solution that works under all cases (99% sure) and that is very fast (~0.008ms)
boxtesting.rbxm (4.7 KB)

courtesy of @AxisAngle

5 Likes

Would it be possible to implement this into the SmartBone module to prevent it from clipping through the player?

1 Like

Yes, from what I saw in the module the implementation would be running this after each normal bone update.

This is a real eye opener! I had a solution that was actually working for box collision, however it was very buggy in that sometimes the collision would fail and the bones would re-enter the box test. This however seems to have eliminated that problem!

10 Likes

Iā€™m looking forward for the next update!

1 Like

Will you be updating the module to have an optional collision-part table?
I really hope you do, because Iā€™m not that good at scripting at a highly optimized level.

1 Like

Some issue I ran into is they will start lagging if hairs collide with each other, Since I use Transformations and such, Is there a way to make Hair stop being Animated when its Transparent?

Would you mind sharing the hair physics one you made? Iā€™d like to look into it and see how I can incorporate my own hairs and test performance on my end before trying. :pray:

Is this the same/similar method that I see in tank games like Steel Titans and Cursed Tank Simulator?
Iā€™ve been trying to figure out how they managed to do the tracks and wobbly antennas lately, but I donā€™t know exactly what to look forā€¦

But could someone at least tell me how they did the wobbly antennas?

This is actually pretty smart! I tested it a few months ago and I love how smooth it works, but Iā€™m having a problem. I implemented the SmartBone in a ponytail of a morph, whenever an animation is played by the character it kinda breaks the whole animation, this only happens with centrain animations, what it could be?

do you have any footage of it?

Does anyone have any hairs that have bones in themā€¦ I canā€™t find any.

Yes! The arms and many other parts are supposed to be moving but they are like frozen.

I also looked very deeply for the error and tried to see if it was any core of the animation or the script but any of those seem to be causing this bug, if I remove the ponytail from the morph it starts going normal and smooth.

3 Likes

What are you using to weld the hair to the head? If its a motor6d, I recommend switching to a normal weld. and make sure only the part that has the bones in it is set up for SmartBone

1 Like

The hair itā€™s actually not connected to the head, itā€™s just a model called ā€œHeadā€ and all the head parts are there including the ponytail. Itā€™s like it haves 6 bones but only 5 of them have the SmartBone, the other one itā€™s weighed to the top of the ponytail so the whole thing doesnā€™t move, so I donā€™t know what else it could be.

In that case, did you make sure the RootBone attribute is set only to the hair?

Will you be updating the module to have an optional collision-part table?

Yes its only set to the hair, here is a better preview of the problem.

As you can see when I remove the hair, the animation starts to go smoothly that itā€™s how it should go, Iā€™ve searched everywhere and tried for everything but I still canā€™t figure it out.

Is there a possible way to stop hair from moving if it is Fully Transparent?