Play 'CollisionTest' on GameSalad Arcade

GameSalad

GameSalad

CollisionTest

This is a demo that shows that when actors on scrollable layers try to detect collisions with actors on on non-scrollable layers, collision detection breaks. Move the orange square with your arrow keys. When it collides with green objects it is programmed to display "Colliding," This works fine when it collides with the green squares because they are on scrollable layers. However, the green rectangle is on a non-scrollable layer. Notice that a collision will be detected where there is none visibly (a false positive) and not be detected when the orange square finally gets to the top of the scene and visibly collides with the green rectangle once scrolling stops (false negative.) I believe this is because the coordinates for the green rectangle are static relative to its own layer while they should be dynamic relative to the scene.

Share

Link

Embed