Actor order in layer affecting collision detection

MekonbekonMekonbekon Member Posts: 8
edited March 2013 in Working with GS (Mac)
Hi all,

I have two actors, A and B.
Both actors are on the same layer.
On actor A I have an "if actor overlaps or collides with actor of type B change direction" rule.
Actor A is moving at around 50.
Actor B is stationary, but its width is oscillating using a sin rule.
Neither actor has a bounce collision rule - they pass through each other.

Here's the problem:
If A is below B in the layer then the rule triggers correctly, but if I reorder the actors so that A is above B then the rule doesn't trigger.
If I stop B oscillating then the rule works fine.
There is a reasonably long period of overlap (almost 1s), plenty for the condition to register.

Any ideas what is happening? Why should the order+oscillation have this effect?

Ideally I want A to be above B. Reassigning the rules to work off of B isn't really an option.
I guess I could create an invisible non-oscillating buddy for actor B and use that for the collision, but I would also like to work out why this is happening, for future reference.

As an alternative workaround, is there any way to change the order of actors within a layer on the fly, or even change the layer that the actor is on?

I'm using Windows GS.




Answers

  • fadamionfadamion Member, PRO Posts: 309
    Changing with does not work well with collide probably cuz its in a state of unknown. Try a workaround for changing size.
  • PimanPiman Member, PRO Posts: 165
    I have this exact problem and somebody replied to me that it really wasn't so. It is so. Depending on what layer or the layer order actors are on, rules arbitrarily stop working.

    I just spent HOURS trying to find a bug until I found it it was this GameSalad bug again. Swell.
  • MekonbekonMekonbekon Member Posts: 8
    edited March 2013
    Sorry to hear you're having the same issue - I ended up opting for the invisible actor.
Sign In or Register to comment.