Collision detection

Collisions that you want to detect must be explicitly defined.
If you want a sprite to hit another, then you must specify that sprite's target.
If you want an arrow to hit a bullseye, then you set the "target" of the arrow sprite to be "bullseye".
You can specify multiple targets by listing them in parenthesis: "target=(flower,bee,moon)".
You may also put sprites "into" a group then list groups using the "targets" parameter.
A collision is detected if the center point of the targeting sprite touches a non-transparent portion of the target.
- yes, this is weak and inaccurate, but it is fast and works for simple animations. This will be upgraded soon!
When a sprite hits its target, then its hashit routine is called.
When a target is hit, then its beenhit routine is called.

Colliding


editable

Multiple Targets


editable

Targeting Groups


editable