PGSPhysicsSolver causes bug with BodyForce in Humanoids

I have a space themed game I’m working on, and am currently creating the basics of gravity control. I need to keep gravity at 0 for many things to work properly, and therefore had to create artificial gravity for use while in space stations. I’m using a BodyForce object with a gravity formula to do this. This works flawlessly when PGSPhysicsSolver is toggled off, however when it is toggled on the character will constantly jitter up and down. No code is changed between these two captures. Is there a way to get around this?

With physics solver off: https://gyazo.com/9f5262105bda9d1984b1b0af79dc883e

With physics solver on: https://gyazo.com/fb521d22274eebf926a3c7dac70378e0

Attached is a place file showing the bug. The only code running is in game.StarterPlayer.StarterCharacterScripts.BodyForce
By simply toggling workspace.PGSPhysicsSolver on and off you can see the bug.DevforumBugShowcase.rbxl (15.5 KB)

2 Likes

I recommend changing the category of this post to bug reports if you can.

1 Like

Yeah, I could try to do that. I was mostly wondering if there was a workaround or alternate method of simulating gravity.

Just going to bump this one last time before changing category to bugs.

Please attach a repro rbxl file to the OP that demonstrates the issue.

Done. Is there an alternate way to simulate gravity that I could use in the meantime?

Was thinking VectorForce might be more stable since it was created to be used in PGS, but apparently not:

DevforumBugShowcaseVectorForce.rbxl (17.1 KB)

https://gfycat.com/ClearcutWellmadeCrab

Note that the camera is set to Scriptable in this video, so it’s definitely physics and not a camera issue.

1 Like

It even does it with simple .Velocity in the HumanoidRootPart.

Looks like there is a conflict here between position update from part velocity and from the humanoid’s raycasting system that keeps the character afloat. I agree this belongs as a bug report. You can get something similar to happen with PGS off, under slightly different conditions: make a platform with a strong upward force and stand on it.

1 Like

I agree this belongs as a bug report.

Is it currently in the correct category? If not which should I move it to?

1 Like

Yeah, it’s good here.

1 Like

Since the legacy physics solver is being deprecated, is there any ETA on a fix for this?

2 Likes