Unexpected behaviour on gravity on RigidBody2D when setting a Camera2D as current camera.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MAxSaL

Hello,

I am still quite new to Godot, so I am sorry if this is a dumb question.

I made a Player node as a RigidBody2D and successfully made it fall to the ground, which is a StaticBody2D node.

However, when I added a Camera2D to the player and set it as the current camera, the gravity started to lag very much and the player was often able to walk around in air without falling down. It works normally, if I untick “current” in the camera.

Do you know what I did wrong? Thank you :slight_smile:

:bust_in_silhouette: Reply From: GameVisitor

You probably added the second camera as child of the RigidBody2D, and thus the camera is moving following RigidBody2D physics (creating some kind of jag)

current is just a property that describe the default camera (in case u have many)

Thanks a lot! That seemed to be the issue :slight_smile:

MAxSaL | 2018-09-23 11:02