The Daily Click ::. Forums ::. Klik Coding Help ::. Confusion with how 'Fine collision' works when interacting with other objects
 

Post Reply  Post Oekaki 
 

Posted By Message

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
17th September, 2009 at 22:10:06 -

For the past few days Ive had a strange bug I couldn't work out, I stumbled across the solution today but... it doesn't seem to make sense to me.

I realised all of my ramp tiles and ramp events would only work with backdrop objects. So I decided to add new events to make them work with Active objects too. Upon making an active object the player collided with it like it was using 'box collision', and it was. So i ticked Fine collision and it still acted like box collision.

So after a while poking around my code and scratching my head I just decided to make all my my mask and detector objects use 'Fine collision' too and now the ramps act as normal.

The thing that confuses me is that my ramp backdrop objects work fine with only the background object's collisions set to 'fine collision', but with actives the active itself AND my detectors have to use fine collision...

any idea why?

Edited by AndyUK

 
.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
18th September, 2009 at 08:28:01 -

Maybe the collisions for actives and backdrops are coded differently than actives and actives. It makes some sense, as backdrops can't possibly move and there doesn't have to be any code to account for them moving.

Are you checking for collisions or overlapping? You could try checking if it overlaps, see if that works.

Edited by Muz

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Rox Flame

Creative Talentician

Registered
  06/10/2004
Points
  383
18th September, 2009 at 12:50:37 -

I did a few experiments on this a while back.
This is how I discovered the collisions work.
Basically MMF can only process a fine collision OR a box collision, not both, so its filtered like this.

Fine collides with fine: fine collision used
Box collides with Box: box collision used
Box collides with fine: box collision used

When a collision type is picked, it applies to all objects in the collision

 
Current project:
Dynabrick (%70)

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
18th September, 2009 at 19:47:35 -

I guess that explains it then Rox Flame. I don't know why Ive never come across that before though. Just another one of MMF2's little quirks.

Yeah Muz i was checking for overlaps.

 
.
   

Post Reply



 



Advertisement

Worth A Click