Replicating footplanting stuff

Ive made a inverse kinematic rig that uses footplanting, and it went quite well.
The only thing is, this is only the second time ive ever done it, and I have no idea how I would apply this into a game that has FilteringEnabled on, without making remotefunctions die from millions of requests from 20-35 players.

Should I just try and send to the server all of the math, which is then sent to all other clients, or send the cframes of the motor6ds over? no idea lol

sorry if I’m asking for a bit much

3 Likes

For characters and parts that have the player’s network owner, physics are replicated to the server, despite it being experimental mode or not. However, effects that include beams, particles, trails are not and so every client does the rendering job. I think you should follow the approach roblox did for animations, on most games, the server doesn’t executes the keyframes, instead that is done on the client. You should only send the necessary data so every clients can do what you intent, that data might be included on the physics packets they already receive.

Run the foot planting locally for all the characters on each client, that way you don’t need to bother with much replication stuff. (ie replicating position, velocity, and look direction should be enough)

3 Likes

This has nothing to do with physics :thinking:

@x_o wouldn’t that be very intensive having to calculate the positions and lerp the legs for each player in the game?

Depending on the implementation, it shouldn’t be that intensive.

1 Like

I don’t have much to say, but your footplanting looks top-notch.

1 Like

Native animations depends on humanoid states and those depends on physics, the footplanting should have similar relationship with the physics.

Footplanting is done by changing Motor6D’s which do not replicate to the server.

Actually, the CurrentAngle property of the Motor class replicates while the network owner of the parts referenced by Part0 and Part1 is the player which is changing the property.
Example: Motor6D.rbxl (13.4 KB)

That is the CurrentAngle property, what we are changing when working with footplanting are the C0 and C1 properties which do not replicate.

Alright, ill give it a go

like x_o said, there is really no point to having these IK calculations being ran server side and then passed to the client… all the IK animation calculations for ALL players should be handled locally! running it server side wastes not only wastes precious server cpu cycles, but also passes useless data back and forth.

if your footplanting calculations are being ran for 30 players, it shouldn’t really become a problem with cpu resources locally, and if it does you can do some level of detail optimizations (skip frames for far away players? don’t even load for far away players?)