#(Beginner) Ground x player collision issues
1 messages · Page 1 of 1 (latest)
can you make a .mp4 of it
so it auto plays
you can enable visible collision shapes under the debug tab in the upper left corner of the editor.
yeah it is the problem actually
the player's collision box is way bigger than it should be
why is that though? note that i am changing the shape's size in the script to fit the animation.
I am changing it like this, is this wrong?
what type of shape is it?i can't seem to find this property on any shape2d.
it's a regular RectangleShape2D. I am using shape.extends because this is what ChatGPT told me, the regular Scale property in Transform did not work for the collision box.
as far as i know such a property doesn't exist for RectangleShape2D, so i'm really confused now.
i'm surprised it doesn't crash
RectangleShape only has a size and is always centered on the CollisionShape node.
A property called collision.size ? I can't find one named that. By the way, thanks a lot for being able to help me.
no, the shape
the shape has a size relative to the position of the CollisionShape2D-node
I'm a little confused here. what property do I change?
collider.shape.size
an alternative solution to your problem might be to not actually change the size of the collision shape during the animation, but instead change the active one. a Physics Body can have multiple collisionshapes at once, and you can use the disabled-property to change which one is currently active.
yeah but I have about 6 different animations and it's going to be painful to do all that, but if anything won't work I will do it.