You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Objective
The `move_and_slide_2d` example sometimes gets stuck on ramps due to a skin width that is too small. This is because it's not accounting for the scale of the world.
## Solution
Scale the `skin_width` by `PhysicsLengthUnit`. This appears to fix the problem.
## Testing
Ran the `move_and_slide_2d` example.
/// The entity of the collider that was hit by the shape.
277
281
pubentity:Entity,
278
282
279
-
/// The maximum distance that is safe to move in the given direction so that the collider still keeps a distance of `skin_width` to the other colliders.
283
+
/// The maximum distance that is safe to move in the given direction so that the collider
284
+
/// still keeps a distance of `skin_width` to the other colliders.
280
285
///
281
286
/// This is `0.0` when any of the following is true:
282
287
///
@@ -322,7 +327,8 @@ pub struct MoveHitData {
322
327
/// The entity of the collider that was hit by the shape.
323
328
pubentity:Entity,
324
329
325
-
/// The maximum distance that is safe to move in the given direction so that the collider still keeps a distance of `skin_width` to the other colliders.
330
+
/// The maximum distance that is safe to move in the given direction so that the collider
331
+
/// still keeps a distance of `skin_width` to the other colliders.
326
332
///
327
333
/// This is `0.0` when any of the following is true:
0 commit comments