Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Robster | |
Old Version | Published before Godot 3 was released. |
Hi all,
I have a breakout game. Works just fine in all instances until I rotate/scale a brick.
I’m trying to add an interesting scene with an animated set of bricks. The hierarchy is:
Node2d
-- texture button
-- StaticBody2D
----CollisionShape
So in normal game situations, the ball (which is a KinematicBody2D
) bounces at correct angles etc.
Once I rotate / scale the brick though, the ball hits the brick and hugs the edge of it, slowly slowly sliding along it until it’s freed.
Can anyone offer any advice as to why?
Have you tried running the game with visible collision shapes? It might reveal something about what the colliders are doing. You can enable them in under the little “beacon” icon with the play, pause and stop buttons. Will be listed as “Visible Collision Shapes”.
Based on the docs I’m not entirely sure whether it’s safe to move a StaticBody2D outside of animations, so you might need to use a different physics body for the brick.
literalcitrus | 2018-01-17 22:33