0 Favourites

... Invert collision

  • How can I invert collision?

    • Thanks
  • It doesn't really make sense to invert an 'on collision' event. What does 'On not collided' mean?

    You might want to try inverting 'is overlapping' and adding a 'trigger once' beneath that, though. It will fire once every time the sprite goes from overlapping to not overlapping.

  • Hi, I have the same question than Xanco. What about if I want to detect when the player is flying for instance, without colliding any object?

    What I am doing (2 days using Construct) is a platform game using physics. For each state, walking, running, flying, falling, etc. there is a group of events and a specific object to use. So, how to know if the object is not colliding?

    Thanks

  • Learner, right now it's late and i can't test anything, but you could always try making it so if the object/character overlaps an item it changes a variable that is for example named "Collision". And when it's not on, it could know it's flying? Sorry if this sounds a little badly formulated but i'm a little tired. Hope it works tho. ^^

  • Just invert 'is overlapping'. 'On collision' cannot be inverted because it's a trigger, whereas 'is overlapping' is tested every tick.

  • Thanks for your tips. About "is overlapping" it seems it does not work. It never overlaps the platform. I just used a box as player and another as platform, both using physics behavior. When the box is falling �is overlapping� is not triggered, as it is expected, but when it collides with platform, the same happens, it is not triggered.

    Thanks anyway

    Leaner

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I needed to change the char animation according to the approach or colliding with some objects in the scene. I then used this logic:

    <img src="http://dzner.pro.br/exemplo.png" border="0" />

    If it helps you or anyone else about it, I'll be happy.

  • Another approach is to give the player a instance variable called "Flying" and set that to 1 whenever he's flying

    then check against that as needed.

    eg: if player "flying" = 1 then do this, Else do that.

    But with regards to the object not "overlapping" with the platform, try using the collision at offset condition and use something like y+20 as the offset to make sure its lower than the bottom of the character's feet. (without seeing the game im not sure how it looks)

  • inverting "is overlapping" and adding "trigger once" together helped solve a headache for me. thanks Ashley!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)