Operating system or device - Godot version:
Windows 10 x64 - Godot 2.1.2.stable.official
Issue description:
After moveing a KinematicBody2D with move(), the Collider transformations are not updated.
Every move will only test with the initial Collider position/transformation.
Steps to reproduce:
func _ready():
set_fixed_process(true)
func _fixed_process(delta):
move(Vector2(0, 100))
move(Vector2(100, 0))
set_fixed_process(false)
A only moves down, but not to the right.
Even though after moving down, A would fit under B.
It should be under B and should have moved in an L-shape (first down, then right).
Move does not update Colliders to new position, so while trying to move right, it seems to be blocked by B, as it would be, if we only moved right.
Workaround:
change _fixed_process to:
func _fixed_process(delta):
move(Vector2(0, 100))
var st = get_shape_transform(0) # get current shape transform, assuming we only have 1 shape
st.o += get_travel() # add move translation to shape transform
set_shape_transform(0, st) # update shape transform
move(Vector2(100, 0))
# you should reset the shape transform to its original state befor returing
set_fixed_process(false)
I think this is duplicate of #7951, but I would like to have @RandomShaper to confirm :smiley:
Yes, it's the same issue.
I missed that one.
Thanks.
Most helpful comment
I think this is duplicate of #7951, but I would like to have @RandomShaper to confirm :smiley: