I'm coding some projectiles, and thus am getting acquainted with Area2D. I've just noticed a quirk that I thought I should point out lest anyone else run into this problem.
When fiddling with Area2D's options, I toggled monitorable
off, as I presumed this'd remove some performance overhead. The only documentation I can see for this flag is "if true, other monitoring areas can detect this area", so it seemed fine.
However, I then noticed that the bullets weren't colliding with my TileMaps. After a lot of headscratching, I found that switching on TileMap's collision_use_kinematic
solved the issue (in what felt like a pretty dirty way). The bullets still weren't colliding with the level bounds though (which is a StaticBody2D
), so I eventually rediscovered the monitorable
option, tried toggling it back on, and everything now works fine.
There doesn't seem to be any mention of this lack of collision with StaticBody2D
/TileMap
in the docs, so it feels like a side-effect, which made it difficult to understand.
Am I going crazy, or can we add a note to the docs about this behaviour? And additionally, can anybody explain why it's like this?