Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision).
Takes no parameters.
Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision).
2D Overlay
Parameters & Returns
Parameters
This function takes no parameters.
Returns
Int
Quick Summary
Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision).
Takes no parameters.
Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision).
Technical Exegesis...
Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision). Takes no parameters. Returns Y coordinate (integer pixels, world/screen space), returns last stored value (from most recent b2dIsImagesColliding or b2dIsImagesCollidingSimple call that found collision). Reads g_2D_lastImageCollisionY (global variable updated by collision functions).
Returns Y coordinate of last image collision (world space, set by b2dIsImagesColliding/Simple, use after detecting collision). Takes no parameters. Returns Y coordinate (integer pixels, world/screen space), returns last stored value (from most recent b2dIsImagesColliding or b2dIsImagesCollidingSimple call that found collision). Reads g_2D_lastImageCollisionY (global variable updated by collision functions). Use to spawn effects at collision point (particles, sounds, explosions), calculate collision response (bounce direction, knockback), or debug visualization (draw marker at collision). Collision point storage: updated when b2dIsImagesColliding or b2dIsImagesCollidingSimple returns 1 (only on collision, not on no-collision), stores first overlap pixel found (not center or average, deterministic first match in pixel scan), world space coordinates (position in screen/world coordinate system, Y increases downward). Use cases: (1) Spawn effect (If collision Then CreateExplosion(b2dGetImageCollisionX(), b2dGetImageCollisionY())), (2) Collision normal (colY=b2dGetImageCollisionY(): If colY>playerY Then hitFromAbove Else hitFromBelow), (3) Visual feedback (If collision Then b2dDrawImage(impactSprite, b2dGetImageCollisionX(), b2dGetImageCollisionY())), (4) Physics response (calculate bounce angle from collision point relative to object centers). Common patterns: retrieve point = If collision Then x=b2dGetImageCollisionX(): y=b2dGetImageCollisionY(); pair with X = always call both getters for full 2D point. Value persistence: stored until next collision (value remains until b2dIsImagesColliding/Simple updates it), no automatic reset (doesn't clear after query, persistent), undefined if no collision yet (may be 0 or uninitialized if no collision detected since start). Performance: cost zero (simple global variable read), safe to call frequently (can query multiple times per frame). Related: b2dGetImageCollisionX (pair with this function for full 2D point), b2dIsImagesColliding (sets collision Y with rotation/scale), b2dIsImagesCollidingSimple (sets collision Y without transforms).