Skip to content

Conversation

@Bitto1070
Copy link
Contributor

its FlxG.mouse.overlaps, but working on objects in cameras that arent FlxG.camera at scroll 0
probably needs a better description but thats the best i could come up with

@Bitto1070 Bitto1070 changed the title better mouse overlapping function for CoolUtil Better mouse overlapping function for CoolUtil Nov 6, 2025
@ItsLJcool
Copy link
Contributor

its FlxG.mouse.overlaps, but working on objects in cameras that arent FlxG.camera at scroll 0 probably needs a better description but thats the best i could come up with

Here is a better description:

Implements a CoolUtil function that allows you to properly check if the Mouse overlaps an object on any camera layer, properly.

@Bitto1070
Copy link
Contributor Author

i meant for the actual function in the code but thanks lj

@chronicsilly
Copy link
Contributor

you should define the type of posthing as FlxPoint and also wouldn't it be better if it used the sprite's camera by default rather than the first camera in the list?

@Bitto1070
Copy link
Contributor Author

Bitto1070 commented Nov 30, 2025

wouldn't it be better if it used the sprite's camera by default rather than the first camera in the list?

somehow i never thought about doing this, let me test and push it

thinking of not even allowing disjointed overlap checks
keeping it for now
@chronicsilly
Copy link
Contributor

wouldn't it be better if it used the sprite's camera by default rather than the first camera in the list?

somehow i never thought about doing this, let me test and push it

Reason why I bought it up is I have similar code running on some of my mods as a public function in global.hx that check for the sprites camera

Having it in coolutil or just as FlxG.mouse.overlaps would be a huge help too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants