This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

When creating two StaticBody2Ds, no matter how well aligned they are, a RigidBody2D passing over them will jump upwards sometimes. I expected the RigidBody2D to just roll over the connection since there is no gap at all, but it jumps instead.

The video below shows the issue, with debug collision shapes visible:


Here's the full code to reproduce; Just create a new project and attach the code to a Node2D:

extends Node2D

const STATIC_SIZE = 2000
onready var img = preload('res://icon.png')

func _ready():
    var rb :=

    var s =
    s.texture = img


    # Add a circle shaped collision
    var rb_col :=
    rb_col.shape =
    rb_col.shape.radius = 50

    # Configure to have no friction and no damp
    rb.linear_damp = 0
    rb.physics_material_override =
    rb.physics_material_override.friction = 0

    # apply impulse
    rb.apply_impulse(Vector2.ZERO, Vector2(1050, 0))

    # follow with a camera
    var camera :=
    camera.current = true


    # create 10 consecutive StaticBody2D perfectly aligned
    var pos := Vector2(STATIC_SIZE / 2, 200)
    for x in range(0, 10):
        var ground :=
        var ground_col :=
        ground_col.shape =
        ground_col.shape.extents = Vector2(STATIC_SIZE / 2, 100)

        # Add a sprite so we can see where the division is
        s =
        s.position = Vector2(-STATIC_SIZE/2, -50)
        s.texture = img

        ground.position = pos

        pos.x += STATIC_SIZE
in Engine by (23 points)

I have tried with square shape and capsule shape, all of them present the issue

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.