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
Godot version:
Godot 3.0.2 official and Godot 3.0.3 RC1.
OS/device including version:
Windows 10 64 bit.
Issue description:
Inexistent intersections between KinematicBody2Ds and Area2Ds (untested with other configurations) occur when those nodes are manually moved through position or global_position not to be in contact.
The issue is best described below.
Steps to reproduce:
The reproduction project consist of a "character" node called KinematicBody2D that the player can move with WASD. The player can move between areas if he touches the "gates" (visible if "Visible Collision Shapes" is turned on) to the right and to the left of the current area or if he presses the left or right arrow keys.
Every area's contents are generated in code: gates and the object (which can be a collector or a collectable, if a collector, a KinematicBody2D, touches a collectable, an Area2D, the collectable object will trigger its "collected" animation and do a print). Important: collector and collectable objects are always in the same position relative to the belonging area.
When the player changes area he is first repositioned in a free spot where no overlaps or collisions should occur, the areas are then all moved through position in such an order so that they never overlap, to make the current area the one in position (0, 0).
Actual results:
When the player changes area, the collectable object in the new current area gets collected by the collector object in the previous area, even if they should never have overlapped.
If the player changes area touching a gate when he is in area 0 or in area 2 (leftmost and rightmost), he will never stop in area 1 (the central one).
It seems that Godot takes some frames to update the position of colliders used to detect overlaps if they are moved this way.
Expected results:
The player changes area, no collectable object is collected since the only object that can collect a collectable is in a different area.
The player changes area touching a gate, he will always end up in the adjacent area.
Minimal reproduction project: KB2DUpdatePositionTest.zip
Read the documentation in test.gd for further details.
The text was updated successfully, but these errors were encountered:
The collider positions are updated every physics frame after you move them, not at the same exact moment you move them. KinematicBody2D will keep finding them at the same place even if you move them until a physics frame passed.
The reason for this is that it's considerably more performant to do it this way (moving everything at once) in the physics engine.
Godot version:
Godot 3.0.2 official and Godot 3.0.3 RC1.
OS/device including version:
Windows 10 64 bit.
Issue description:
Inexistent intersections between KinematicBody2Ds and Area2Ds (untested with other configurations) occur when those nodes are manually moved through
position
orglobal_position
not to be in contact.The issue is best described below.
Steps to reproduce:
The reproduction project consist of a "character" node called KinematicBody2D that the player can move with WASD. The player can move between areas if he touches the "gates" (visible if "Visible Collision Shapes" is turned on) to the right and to the left of the current area or if he presses the left or right arrow keys.
Every area's contents are generated in code: gates and the object (which can be a collector or a collectable, if a collector, a KinematicBody2D, touches a collectable, an Area2D, the collectable object will trigger its "collected" animation and do a print).
Important: collector and collectable objects are always in the same position relative to the belonging area.
When the player changes area he is first repositioned in a free spot where no overlaps or collisions should occur, the areas are then all moved through
position
in such an order so that they never overlap, to make the current area the one in position (0, 0).Actual results:
When the player changes area, the collectable object in the new current area gets collected by the collector object in the previous area, even if they should never have overlapped.
If the player changes area touching a gate when he is in area 0 or in area 2 (leftmost and rightmost), he will never stop in area 1 (the central one).
It seems that Godot takes some frames to update the position of colliders used to detect overlaps if they are moved this way.
Expected results:
The player changes area, no collectable object is collected since the only object that can collect a collectable is in a different area.
The player changes area touching a gate, he will always end up in the adjacent area.
Minimal reproduction project:
KB2DUpdatePositionTest.zip
Read the documentation in test.gd for further details.
The text was updated successfully, but these errors were encountered: