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
I'm trying to scale down the Rigidbody2D node (Flame node):
This is how I'm doing it. Sprite nodes scales down when I scale its parent down, but the Collision node does not.
Which is strange, because , if I do this in the graphical editor, everything scales perfectly fine, including the CollisionShape2D.
So I realise that I can't change CollisionShape2D size with the scale() method.
But how else can I scale a node with a CollisionShape2D?, I tried to to code within the CollisionShape2D node, it doesn't work either. So what can I do to dynamically shrink the Node with a collision?
Someone on IIRC told me to swap with 2 collision, but is that really the only way?
Link to minimal example project (optional but very welcome):
Apart from that, CollisionShape is a helper, wont scale the body's shapes or do anything other than add editor and debug tools.
You will have to scale the shape resources manually (get/set shape) and children (shapes are not children) instead of the body until Godot 3.x changes something on the way shapes are managed.
This is my node hierarchy:
![image](https://cloud.githubusercontent.com/assets/3944421/21488277/f195d05c-cbdd-11e6-832f-8249b5527fd5.png)
I'm trying to scale down the Rigidbody2D node (Flame node):
This is how I'm doing it. Sprite nodes scales down when I scale its parent down, but the Collision node does not.
Which is strange, because , if I do this in the graphical editor, everything scales perfectly fine, including the CollisionShape2D.
So I realise that I can't change CollisionShape2D size with the scale() method.
But how else can I scale a node with a CollisionShape2D?, I tried to to code within the CollisionShape2D node, it doesn't work either. So what can I do to dynamically shrink the Node with a collision?
Someone on IIRC told me to swap with 2 collision, but is that really the only way?
Link to minimal example project (optional but very welcome):
Fire.zip
The text was updated successfully, but these errors were encountered: