Client Physics Interaction With Server Physics Controllers

When utilizing the new controllers Roblox introduced recently, I’ve come across a few problems that are drawn between either incorrect usage, or platform implementation issues.

Recently, I’ve started to program an enemy AI utilizing the Roblox ControllerManager and GroundController Instances. At its core, I wanted to have a server physics root, in which the client could render the enemy model on top of. I could successfully implement this logic utilizing humanoids previously, so I assumed this feature could support this.

A few issues popped up while making this.

Client physics sleep applying to objects welded to the server physics root (not following the server-moving object that chased the player)

Incorrect movement dynamics while welded, the controller starts moving in all sorts of different directions on the client. (All client welded objects have no collisions, mass, or anchored state set to true)

Physics launching the object on the client, similar to the problem above, but the server root (which should not be impacted by the client objects) has some pretty crazy movement on the client, whereas retaining normal physics on the server.

Now look, a lot of this should seem like regular physics replication issues stemming from client alteration, but in my case none of the objects should, and are not intended to interact with the server physics root. Upon a lot of testing with custom physics properties, massless states, and testing with client physics sleep, I have not found a reliable solution to this problem.

For further information, the server root controller sets its movedirection to move towards the player about every 1/15 of a second, secondly, there is a velocity applied to the root every 4 seconds to simulate jumping forward.

Here are some screenshots and videos for visual representation.

Controller Physics Directions.

-Complete Intended Server Behavior
https://gyazo.com/15e79ab36f75b5860e9351cf912f875b.mp4
https://gyazo.com/c98984f90ebd5cf03d68f7db39127f86.mp4

Client Code Fragment
https://gyazo.com/639d5245c545337362ae8f94e2349818
(the server code works normally, as intended, but when the following code applies a client model overlay, problems occur)

Overall, im looking for a solution that allows me to attach a client model to the server physics root without needing any additional logic to maintain the model overlay.

Thank you for your time.

1 Like

Thats a lot of words.

Have you done Network ownership visualization and seen if anything is weird there?

I have not, but, I set the controller network owner to server so there shouldnt be any issues regarding this. The server physics remains untouched, as the physics problems only occur on the client.

Sorry for the inconveniences, the problem was due to the client and server having different assembly roots despite being welded.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.