Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision detected only when moving #34124

Closed
golddotasksquestions opened this issue Dec 5, 2019 · 5 comments · Fixed by #33615
Closed

Collision detected only when moving #34124

golddotasksquestions opened this issue Dec 5, 2019 · 5 comments · Fixed by #33615

Comments

@golddotasksquestions
Copy link

golddotasksquestions commented Dec 5, 2019

Godot version: 3.1.2 stable

OS/device including version: Win7

Issue description:
Collision is only detected when either colliding object is moving.
collision_only_when_moving

Steps to reproduce:
Animate the CollisionShape of an Area2D and try to detect it in another not moving object.

Minimal reproduction project:
Collision_only_when_moving.zip

@golddotasksquestions
Copy link
Author

Can confirm same bug in 3.0.6 as well.
Minimal 3.0.6 project:
3.0.6_Collision_only_when_moving.zip

@golddotasksquestions
Copy link
Author

Can confirm the same effect without the AnimationPlayer, just using code:
collision_only_when_moving_code1

@golddotasksquestions
Copy link
Author

golddotasksquestions commented Dec 27, 2019

Tested with RigidBodies2D in 3.1.2 stable, exactly the same result. Collision are not detected when shape properties are changed in code or via animation, but are detected when RigidBody2D is moving.

Same results throughout in 3.2 as well.

This really is a problem for users of the CollisionPolygon2D as with the CollisionPoligon2D the main advantage is in animating the Polygon vertices. Just moving or scaling the Area2D is not a substitute.

@iamiota
Copy link

iamiota commented Jan 11, 2020

Add position = position in the last line of func _physics_process.

@golddotasksquestions
Copy link
Author

This works @iamiota but makes absolutely no sense to me whatsoever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants