Elevator physics has become slow/jittery as of recent update

Recently I started getting reports that the car-elevators in Car Crushers 2 are no longer working properly. These are large physics-controlled platforms that carry vehicles between floors in the building. They move using a prismatic constraint and are forced to 100% network ownership on the server (SetNetworkOwner(nil))

Currently these elevators will hitch and struggle a lot more than they used to when there’s a vehicle on the platform, taking nearly 5-10x as long to reach the destination while visually “jumping” as constantly accelerates and stops.

You can try this in the repro file I attached. If you enter the elevator with your character it will quickly and smoothly take you to the top floor. But if you click the green button to teleport the car onto it, you’ll see what I mean.

Expected behavior

The travel-time should be nearly identical no matter if there’s a vehicle on the platform or not. That’s how the elevator used to behave in this scenario. (And we haven’t made any updates that should cause this change)

A private message is associated with this bug report

5 Likes

Hi! Thanks for bringing this to our attention. Can you please attach the repro again, I’m not able to see it on your original post. Thanks!

1 Like

Thanks for sending, do you know when these issues began?

1 Like

I’ve noticed this with elevators that have server owned ownership with client owned parts on top; I’ll try to make a repro

2 Likes

Hi again,

I looked into your repro. The slow platform movement is a result of networking. If you turn on network ownership visibility (Studio Settings → Are Owners Shown), you’ll see that the platform is owned by the server (white) and the car is owned by the player (green).

When the physics engine (on the server) resolves the collision of the platform with the car, it only “sees” a car moving at some velocity (i.e. whatever velocity the car is moving at when it was last updated on the server). Since our physics solver is iterative, it needs to update both the velocity of the car and the platform to get the correct behavior. But, as the car is owned by the player, the server only updates the platform’s velocity, and as a result, the motion is jittery.

To resolve this, you should set the network ownership of the platform and the car to be the same (both server or both client). This will produce smooth motion as the physics solver will simulate both objects together.

1 Like

Here’s my repro:
StutteryPrismatics.rbxl (59.9 KB)

Repro steps:

  1. Playtest the game
  2. Walk onto the grey platform with the buttons on it
  3. Press and hold the up arrow and down arrow buttons to move the elevator up and down. Notice that when the character is on the elevator it is smooth.
  4. Lower the elevator back down the the ground
  5. Drag the red cube onto the elevator. There’s a script inside that sets the network ownership to the player upon dragging
  6. Try to lower and raise the elevator, and notice the stutters that happen when moving up and down.
2 Likes

What a great demo, thanks for sharing! This perfectly illustrates the issues that can arise when an object on a platform has a different owner than the platform’s owner.

Hi, I’m aware of the network differences but this is entirely on purpose right now. It has always been this way in my use case, and it used to work very smoothly up until roughly a week ago.

If I only put my character on the platform of that repro, the elevator will move quickly and smoothly just as I would expect it to (despite the network owners being different). It’s only when I place the car here that I start seeing this issue.

There would be massive implications on all my physics mechanisms if I had to allow the clients to control their network ownership. Because currently I rely on the fact that server-owned physics objects can’t be stopped by other player-controlled items (Like vehicles). This allows me to have a large wrecking ball that never stops, even if vehicles get pushed into walls and similar (Just an example)

This elevator is also expected to carry multiple vehicles from different owners at once. I don’t see how I’d be able to make that work any more if the elevator is owned by one of the clients

1 Like

I feel like this might be special behavior for Humanoids; if I remove the humanoid from the character model then it stutters as well

That’s correct, we have special logic for Humanoids on remotely owned platforms.

Do you have any videos of the correct behavior? The only video I could find of the elevator is this, which only shows the elevator going down, which will give smooth behavior because the collisions provide a force in the direction of platform motion.

As 0Tenth pointed out below, we have special logic for Humanoids that ensure this behavior. However, there is no similar logic for general mechanisms.

One solution: when someone presses the button to make the elevator go up, set the network ownership of all vehicles inside of the elevator to the server. When the elevator reaches the second floor, set the network ownership of the vehicles back to the client.

Here’s a clip of what it looked like before: https://youtu.be/pf4dolbDB58?si=uOgnDcYAFBlOybsT&t=267

This is with the same same speed settings as the repro, with the elevator being server-controlled and the car being physics controlled.

Unfortunately I can’t change the network ownership of vehicles in Car Crushers 2. A lot of the vehicle properties vary between the client/server with my setup, and it would also break the ability for players to keep driving while the elevator is moving.

In that clip, the player left his vehicle to press the button, so there’s a good chance that the vehicle’s ownership changed to the server while the elevator was going up. Do you have a clip of someone riding the elevator up while still in their car?

Here’s another one (With players sitting in their cars) https://youtu.be/mZOZmpM3tgI?si=Kq5q79r6RLTxeH-0&t=490

I know for sure that the network ownership has always been the same as that repro. I tested this studio when implementing the elevator only a couple weeks ago (was using “Are Owners Shown” to ensure the elevator remained server-sided). It looked just like the repro file with the elevator platform using a white outline, and the car using a colored one.

Thanks for finding that, would it be possible to send me that green car model so we can try to exactly reproduce that clip?

1 Like

No problem! I sent you another file with the green car included

1 Like

Thanks, I do see quite a difference in behavior between the youtube video and the latest studio, assuming all other variables are identical. I’m working with my team to determine if anything changed recently.

2 Likes

Any update on this? The issue seems to have started at around 12th of January from the first user report I can find.

Unfortunately not, and we don’t have any changes that coincide with that timeframe. I built a version of studio from October, and I saw the same slowness, so it doesn’t seem that this was working correctly even before January. Did you publish any changes to your experience around then?

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