![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | reggie |
I’ve searched everywhere but i cant seem to find anything about getting the collisionshape of a TileMap.
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | reggie |
I’ve searched everywhere but i cant seem to find anything about getting the collisionshape of a TileMap.
![]() |
Reply From: | kidscancode |
You can’t get this from the TileMap, it’s not exposed to the API. What are you trying to accomplish?
If you must have a shape, you can make the TileMap the child of a CollisionObject2D and set collision_use_parent
, and the parent object will have a polygon collision shape created and added to it.
is the new polygon collision shape added as a child to the parent?
reggie | 2021-03-13 01:48
Yes, for example, if you had a StaticBody2D with a TileMap child, setting collision_use_parent
would give the StaticBody2D a collision polygon shape.
kidscancode | 2021-03-13 02:24