Godot Version
4.3.stable
Question
In my game I have a moving spaceship (a TileMapLayer), it has use_kinematic_bodies
enabled to act as a moving platform for the players.
But when moving it by hand like this:
func _physics_process(delta: float) -> void:
position.y += 20 * delta
the TileMap passes through the floor (another TileMapLayer, tried with and without use_kinematic_bodies
).
I tried setting the ship as a child of a CharacterBody2D or creating individual shapes for each tile, but none of my attempts worked.
Is there any way to make the TileMap act effectively as a CharacterBody2D, so as not to move if there are obstacles in its way?