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

move_and_slide() Collision Issues #69884

Closed
froggestspirit opened this issue Dec 11, 2022 · 2 comments
Closed

move_and_slide() Collision Issues #69884

froggestspirit opened this issue Dec 11, 2022 · 2 comments

Comments

@froggestspirit
Copy link

Godot version

4.0 Beta 8

System information

Linux

Issue description

move_and_slide appears to catch on seams of a StaticBody3D model when the CollisionShape3D scale transform isn't uniform.

Steps to reproduce

Create a StaticBody3D (something like a game level), create a CharacterBody3D, with a CollisionShape3D (I tested with sphere and capsule) child (maybe also a sphere for visibility). Add a script to move the CharacterBody3D, test. Right now, the character should move around without any issues.

Next, in the CollisionShape3D, unlink the uniform scaling in transform, and scale any of the axis, so it's not equal to the other axis (like X = 1, Y = 1.2, Z = 1) and test. The character should now jitter, or occasionally get stuck when moving over seams of the StaticBody3D

In the attached example, Y scale for the CollisionShape3D is set to 2.2, so it should be problematic when testing.

Minimal reproduction project

platformer.zip

@Zireael07
Copy link
Contributor

Scaling collision shapes is definitely something to be avoided!

@Calinou
Copy link
Member

Calinou commented Dec 29, 2022

Duplicate of #5734 (same cause).

Scaling PhysicsBodies isn't currently supported, especially in a non-uniform manner. Uniform scaling may eventually be supported, but it's very unlikely that non-uniform scaling will ever be supported.

In most cases, can resize the shape's extents instead – make sure it's made unique first, so that other instances are not affected. You can use duplicate() for this in a script.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2022
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