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

I am making a 3D game with a custom player controller. For now, it has always worked. Now, for some reason, the player flickers a bit up and down, like shown here, because instead of a CollisionShape with a BoxShape or generated ConvexPolygonShape being used, I used "Create Trimesh Static Body" on my collision mesh I imported from blender to create a ConcavePolygonShape

Video that shows the player flickering up and down (I couldn't get it to be embedded for some reason)

The custom player controller is pretty big, so I'm only going to show the important part (I left out the part that assigns the velocity and does other stuff not related to physics):

func _physics_process(delta):
    # do physics
    vertical_velocity -= gravity * delta
    horizontal_velocity *= horizontal_drag

    # ...

    var to_move: Vector3 = Vector3(horizontal_velocity.x, vertical_velocity, horizontal_velocity.y) + anim_velocity * delta
    var complete_velocity = move_and_slide(to_move, Vector3.UP)
    horizontal_velocity.x = complete_velocity.x
    horizontal_velocity.y = complete_velocity.z
    vertical_velocity = complete_velocity.y

    for i in range(get_slide_count()):
        on_collision(get_slide_collision(i))
        emit_signal("collide", get_slide_collision(i))

I have no idea why it worked with BoxShapes but not with a generated ConcavePolygonShape

in Engine by (32 points)
edited by

1 Answer

+1 vote
Best answer

This is a known bug in Godot 3.2, see this GitHub issue.

As a workaround, scale everything up by a 10× factor. This should make the jittering significantly less noticeable. Make sure to increase the Camera node's Far property so you can see further away.

You can also try switching the physics engine to GodotPhysics in the Project Settings.

by (12,908 points)
selected by

Thanks, this answer is really unsatisfying but I guess I have to wait until this will get fixed

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.