Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:44 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Detect Collision On Non-Transparent Sprite Pixels

Author Message
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 01:08am 06 Nov 2023
Copy link to clipboard 
Print this post

Hello everyone

Is there an out-of-box way to make the sprite interrupt command only call the callback function when the non-transparent pixels of two sprites collide?

In my tests, the callback is called if any parts of two sprites collide, even if the pixels are transparent.

Thank you
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 08:28am 06 Nov 2023
Copy link to clipboard 
Print this post

Collision is detected on the sprite boundary. Anything else would be far to processor intensive. All you can do is limit the size of the sprites to the smallest rectangle possible that has non-transparent pixels on each edge
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024