move 2 objects onto each other, test for overlap, move objects away from each other.
seems simple enough, but it doesn't work :o
am i missing something here? :pacman:
i have included an example mfa, any help is much appreciated :)
Printable View
move 2 objects onto each other, test for overlap, move objects away from each other.
seems simple enough, but it doesn't work :o
am i missing something here? :pacman:
i have included an example mfa, any help is much appreciated :)
I don't have my PC but try to check collision instead of overlap
Sent from my Moto G (5) Plus using Tapatalk
thanx for the reply, but sadly, no it doesn't work with collision either, tho i will need it to work with overlap for multiple detections.
hi my friend ! ;) Hope you are well !
I test with your mfa and it works : Here is the mfa. Tell me if it work for you!
Hey Shinbaxter, this is a known bug in Fusion's collision detection and you'll have to work around it somehow. If you change the position of two objects and then check for collision/or overlap only the changed position of the first object (red in your example) will be updated and put into account for the collision check while the position update of the second object (blue) will be delayed until the next frame loop. As you reset the position of both objects at the end of the frame loop Fusion always misses the collision between red and blue.
You can easily see this by not resetting the blu object's position at the end of the frame loop, then it works.
Here's a thread on the matter and an example with some possible workarounds:
https://community.clickteam.com/threads/98334-Issue-with-horizontal-collision-with-moving-platform?p=719199&viewfull=1#post719199
(destroying - recreating "object B" OR testing collision masks with math)
Now we have another allied in the "overlap delay issue" crusade XD
(but from what we heard it seems extremely likely F3 will make us forget about this nastyness!)
^^ it seems that i was totally wrong ! Sorry guys !!!
"i call forth the power of my great allies... KWARN! OUTBUDDIE!! LIZARD KING!!! to arms men!!!!!" XD
thanx for the replies guys :D
looks like i'm a little late to the party >:D
i've been digging into this & found an old thread where francios explained how the collision works,
heres the full thread (from 2006 X))Quote:
Re: Collision lag bug!!!
OK, I need to explain how a Overlapping condition works. We take the first object at its current coordinates (the actual X and Y position) and ask the collision with all the other objects. All the other objects are tested at there position of when the frame started. In you example, you ask for the collision between the GRAY and then the GREEN (is it green I'm colorblind!). So it takes the actual coordinates of the grey and compares it to the previous coordinates of the green, even if it has been moved in the actions of the same loop.
To make you example work, you should just invert the objects in your condition, replace the gray by the green and vice versa, and it works.
Yves and I have been talking about making the collisions work with the actual coordinates, but this would change the bahavior of MMF and maybe create problems with previous applications. So we do not know exactly.
In your hundreds of events of programs, just make sure the object that has just moved is in the first position of the condition, and everything will work fine.
https://community.clickteam.com/threads/34270-Collision-lag-bug!!!
wel this sucks coz i need to test a collision inside the code loop, moving both objects & testing multiple times before it updates on screen, & deleting & recreating the objects sucks coz of all losing all its values.
also found a feature request by UltimateWalrus which suggested something cool
http://bugbox.clickteam.com/issues/2486
but i think we need a switch which is "real time collision on/off" option in the main project properties, this wud prevent any LEGACY issues.
i cant believe fusion cant check it inside a loop X)
did you check the "math" solution?
if your objects can do with a rectangular collision mask it's a pretty simple and efficient solution
(otherwise it could be done as well, but might get more complicated and less efficient,
i.e. using an array to store object "shape" or testing a detector against a "dummy" stopped object to determine its shape simulating real objects coordinates.. a pain XD)
I made a similar research and found Walrus bug report about this,
there's another one by Casleziro too.
Unfortunately Clickteam confirmed at least twice it's a "legacy" issue they can't fix in Fusion 2.5 :(
But Walrus idea was a very nice solution and perhaps could be a "workaround" more than a fix,
don't know... maybe we can try doublechecking if that's doable...
seems like a good time for fixes/updates and Yves is clearly showing superpowers XD..
unfortunately my object collision masks r not rectangles :(
cud be the time lol ;)Quote:
don't know... maybe we can try doublechecking if that's doable...
seems like a good time for fixes/updates and Yves is clearly showing superpowers XD ..
& yeah, yves & fernando hav been displaying sum exceptional superhuman powers indeed! XD