Topic was automatically imported from the old Question2Answer platform.
Asked By
BlotoPK
Hi everyone. I’m triying to achieve some kind of one way collision for a platformer 3D game without sucess. Now I’m experimenting with areas but it doesn’t seems like a proper way to do it. Any ideas? Can’t find nothing related to 3D.
Thanks in advance.
You can toggle the CollisionShape’s disabled property when the player is above or below it, for example.
if player.global_transform.origin.y > platform.global_transform.origin.y + half_of_player_height: #Add more if the origin of the player is centred.
platform.get_node("CollisionShape").disabled = false
else:
platform.get_node("CollisionShape").disabled = true