Topic was automatically imported from the old Question2Answer platform.
Asked By
keke
Old Version
Published before Godot 3 was released.
Before coming to Godot, I used the Blender Game Engine. In the BGE, you could assign objects ‘properties’ that could be used for collision detection. For example, I might assign some spikes and an enemy in a platformer game the “hurt” property. Then I could write some code in the player script that would dictate what actions should be taken when the player comes into contact with that property (become temporarily invincible/flash white, lose a heart, whatever).
Is there an equivalent system in Godot, or should I do things a different way?
Edit: To clarify: I want to write something that works somewhat like my platformer example - how should I go about doing this?
I don’t know how the BGE works, but I guess that what you call “contact with a property” here could be collision/overlap detection against CollisionObjects/Shapes (pretty much like Box2D), then using signals or checking collisions during process.