Godot Version
4.3
Question
how to change the offset of collisionshape2d or other collision nodes like collisionpolygon2d and etc
4.3
how to change the offset of collisionshape2d or other collision nodes like collisionpolygon2d and etc
Could you be more specific? You can use the move tool (w) in the 2D viewport to offset/position collisionshapes and any other node2d.
the pivot based on which they rotate, you cant do that with the move tool
If you move the collision shape and rotate it’s parent it will pivot on the parent’s origin. I can’t think of a situation where that doesn’t work, if it doesn’t for you could you post your scene tree set up?
what if i have multiple collision nodes and i want to rotate 1 specific collision node instead of rotating the parent (which have multiple collision nodes)
Could you share your scene tree? What are you working on that requires this? It seems hard to imagine, and the devil is in the details.
i am trying to make a 2d game where the player interact with a 3d world(by rotating the x,y plane in z direction )so when the rotation occur i want my collisions shapes to rotate as well but currently they are not rotating on the specific pivot i want so i want to change the pivot
this tool doesn’t work for collisionshape2d
Could you put the CollisionShape2d inside of a node (Node2d for example) that can be pivoted? So it would be OriginalParent → PivotNode → CollisionShape2d?
yeah i did that for other objects, but i cant do it for specific nodes like characterbody or staticbody cuz characterbody needs a collision shape and if i do , characterbody → node —> collisionshape, the collisions are not working properly and the characterbody is giving me a warning to add collision shape
Huh, Yeah I can see the problem then. I can do more testing when I get home from work. But You could try doing a Node2d with a collision shape and then having a child that is your char with its own separate collision shape. Dont know if that would work for you though and it might be a pain later.
You could also try modifying the position of the Collison shape in code?
var CollisionShape= Character2D's.CollisionShape
CollisionShape.position = Vector2(0, 0)
Something like that. Again. I can help more later lol.
it seems like you cannot change the offset(pivot) of node2d too