Help with Collides or Overlaps
grishlock
Member, PRO Posts: 32
I have two actors, that bounce off each other when using the Collide behavior, but do not trigger a rule using 'collides or overlaps with'. They are both moveable, and are on the same layer. I read that collision sometimes does not work when using a constrain attribute, so I've rewritten the movement with change attribute: self.position.x = interpolate... The actors move fine, but do not trigger the rule 'collides or overlaps with'. I'm using Creator 11.0.13 on Mac. Any ideas?
Comments
I've been working on the problem. It looks like the 'collides or overlaps' doesn't like a constrain self.size.width and self.size.height. I'll try to rework that part of the code.
https://facebook.com/Grishlock
That was it - can't have any constrain attributes on either actor in a collision.
https://facebook.com/Grishlock
@grishlock -- you are correct. Constrains override collisions. In fact constrain overrides just about all physics behaviors in GameSalad. Its pretty much the same with interpolate too.
The challenge with constraining self.size.height and width is that GameSalad does not seem to update the bounding rectangles it uses for collision detection. I think it keeps using the old original sizes and not the new updated (constrained) ones. (But I could be wrong about that.)
--RT