Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CharacterBody3D.move_and_slide() doubles in speed as "physics ticks per second" gets higher (when sliding against wall and floor simultaneously) #93334

Closed
LightningStorm0 opened this issue Jun 19, 2024 · 2 comments

Comments

@LightningStorm0
Copy link

LightningStorm0 commented Jun 19, 2024

Tested versions

  • Reproducible in v4.2.2.stable.official [15073af]

System information

Windows 10 - Godot v4.2.2.stable.official [15073af] - Vulkan (Forward+)

Issue description

When a CharacterBody3D is sliding against a wall and a floor at a very shallow angle and certain speeds, it will go twice as fast as it should. This starts happening at anything above 60 physics ticks per second, and becomes more constant the higher the ticks per second is raised.

Recording.mp4

before contact

during contact

after contact

The cube turns red when it is_on_wall() and is_on_floor()

Steps to reproduce

Place 2 static bodies, one wall and one floor. (I used BoxShapes)

Create a CharacterBody3D. (Again I used a BoxShape)

Place the CharacterBody3D so it is almost touching the 2 static bodies. (I did it 0.01 away on the y and z axes)

Set the velocity so it will barely brush up against the wall and floor while moving across them. (Vector3(-4.999919, -0.125, -0.028451) worked for me as this was in the range of velocities causing me issues in another project)

Set your Physics Ticks Per Second to a value higher than 60. (120 works, but it is easiest to observe at about 240)

Minimal reproduction project (MRP)

move_and_slide_bug.zip

@rburing
Copy link
Member

rburing commented Jun 19, 2024

Not reproducible in 4.3-beta1. I think this was already fixed by #90915 (cherry-picked for 4.2.3).

@LightningStorm0
Copy link
Author

It looks like an even more specific issue with this problem is #66249. Glad to see this is already fixed in 4.3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants