As far as I can tell, a character standing on a moving platform who jumps will not inherit the velocity of the platform he’s standing on.
This makes it difficult to build any sort of experience involving moving platforms.
Expected Behavior
If a platform has a horizontal velocity, vx and the character jumps straight up with velocity vy, the character’s velocity vector should be (vx, vy, 0). Right now it is (0, vy, 0).
Ditto for angular velocity.
Actual Behavior
Right now it is (0, vy, 0).
Issue Area: Engine Issue Type: Other Impact: Moderate Frequency: Constantly
EDIT:
I’ve found an even more egregious case.
The attached level uses PrismaticConstriants to slide a rope bridge back and forth. It is impossible for the character to stay on the bridge while it is moving.
I’ve found the character also slides off the moorings at the top of each side of the bridge, so forces on the character are not being calculated correctly in this instance.
I’m not sure this is an engine bug since this has always happened (if you aren’t using bodymovers) as far as I know, so maybe it should be a feature request.
IIRC the engine already knows which part/assembly the player is standing on at all times. So fixing this jump behavior is probably a small fix.
Just because something has been around forever doesn’t mean it is not a bug.
No one cared previously because the camera and networking did not like it when multiple people are standing on the same moving platform. This seems to have gotten a lot better recently, so wonky physics becomes the limiting factor on making things like sailing ships, or fights on the back of moving trains, etc.
I have a script that slightly modifies your movement so that you may inherit velocity from moving platforms. A fair warning, though, you will “bounce off of walls” if you have too much momentum.
game.Players.LocalPlayer.CharacterAdded:Connect(function()
local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local RootPart = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local CF = CFrame.new()
local Value = 0
local MOMENTUM_VALUE = Vector3.new(1, 0, 1)
game:GetService("RunService").Heartbeat:Connect(function()
local state = Humanoid:GetState()
local Cframe = RootPart.CFrame
local CFpos = Cframe - Cframe.Position
CF = CFpos
if state.Name ~= "Freefall" then
Value = 0
return
end
local MAGNITUDE = (RootPart.Velocity * MOMENTUM_VALUE).Magnitude
if Value < MAGNITUDE then
Value = MAGNITUDE
elseif MAGNITUDE < Value then
local momentum = Value / MAGNITUDE
RootPart.Velocity = RootPart.Velocity * Vector3.new(momentum, 1, momentum)
end
RootPart.Velocity = CFpos:ToObjectSpace(CF):VectorToObjectSpace(RootPart.Velocity) + Humanoid.MoveDirection
end)
end)
This is still a problem I believe. I have a platform that is moving via constraints and when I jump the character does not keep the horizontal velocity it had when it was on the platform.
I experienced the same issue a few days ago. I noticed making the platform larger worked for me, though… So, I ended up just increasing the density of the platform and that did the trick.
I’m guessing the platform has to weigh more than the character on it for it to move them?