SmartBone 2 - Simulated Physics and Collision solution for Bones

I just realised I was really dumb and had it on friends only, it should 100% be fixed now!

6 Likes

I think this is just my pc but uh


yea 1 fps :skull:

2 Likes

Do you plan to add live editing of an objects settings? As in updating a BoneTree’s setting when the corresponding attribute is changed. Since right now it’s incredibly annoying having to restart the studio game to adjust settings.
I did implement my own temporary solution to this as seen below. If this feature already exists in some form or another then lmk.

2 Likes

I’ll look into adding this, wasn’t a massive priority for release which is why it isn’t in atm

I’ll add it for bones aswell, but you can also use the runtime editor to edit bone property’s. Just add an attribute called Debug (Only works in studio)

7 Likes

Could you send a microprofiler dump? I’m always looking to optimize further

3 Likes

I’m getting this error… does the script not check the hierarchy fully or was it updated to be set differently?


This is my hierarchy of bones.
[RootsAttribute: Bone.001,Bone.002,Bone.003,Bone.012,Bone.014,Bone.016]
image


Edit: Even with or without the error, SmartBone becomes glitched out, this does not happen with SmartBone 1 (or legacy smartbone)
image
I’m not sure if the error is caused by one of my scripts but I highly doubt it (because it worked with the legacy smartbone flawlessly). The only script (serverside) that does manipulate SmartBone instances just clones, cframes, weld(constraint)s and parents it to the defined target.

4 Likes

Why is the runtime updating on renderstepped now when it used to run on PostSimulation I think…?

2 Likes

O ohh yeah I forgot about that I’ll have to change that around, atm it only looks for rootbones as children and not descendants, I’ll fix that

2 Likes

Everything was re-written from the ground up, and I also believe the runtime used to use Heartbeat but now due to how the code runs it makes more sense for it to be on render step

1 Like

Is there anything that’s going to be done where SmartBone glitches in an unknown way? I might have scenarios or ideas where SmartBone breaks (such as the one I posted above).

  1. Cloning SmartBone instances (additionally welding/cframing) being parented to nil first then somewhere in workspace causing abnormal problems before SmartBone is loaded and vice versa
  2. Starting SmartBone a little later rather than as soon as the client loads in (ReplicatedFirst) to compensate with the cloning of SmartBone instances (example: accesories) or vice versa(?)

Sorry if im pushing it a bit, I just believe that this could be “game breaking” or least be very convenient.

1 Like

I know there are a few issues where sometimes bones are set to a NaN position, I am working to fix them and when theyre fixed I believe that should also prevent the weird cloning issues and what not

2 Likes

PostSimulation is the new RunService event for Heartbeat. PreRender is for RenderStepped.

I just think because of the nature of RenderStepped, and what you’re calculating, it might be more performant to update on PostSimulation (Heartbeat), (as not to hold up frame time in renderstepped).

But that might be something you have to test to truly get the answer.

4 Likes

Amazing work , the Axis Limit works very well and is faster than my modified smartbone 1

2 Likes

idk why but this happens :
when i use v1:


v2:

1 Like

Are you using Spring or Distance constraint?

1 Like

Ohh yeah this will probably be the issue, I forgot to mention that distance is now the default constraint. I’ll have to change that back

In the meantime add an attribute called “Constraint” and set it to “Spring”

Yeah Distance constraint uses gravity by default so your bones are most likely being pulled downward

v0.1.0

v0.1.0 is released, release notes:

Allows for root bones which are descendants of other bones

Fixed a bug with descendant root bones with incorrect transforms

Fixed a bug with the runtime where on an object deletion it would error.

Fixed a bug with frustum culling.

Changed default constraint type from Distance to Spring

Added the ability to change attributes at runtime
3 Likes

Unfortunately it still happens, any idea on how could this happen or could I be of assistance in some matter?

Q: How easy would it be to switch from Smartbone to Smartbone 2?