Object overlaps set of points

This forum is currently in read-only mode.
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • It would be very cool if you could describe a set of points in the object overlaps point condition.

    Such as:

    sprite2 overlaps X = sprite.right

    Y=(sprite.top, sprite.bottom)

    so it registers collision for any y in that interval

    would be really nice and easy to make sensorless custom movements using this.

    EDIT: come to think of it this could potentially be used in a lot of other places too.

    like compare: sprite.x = {0,20} would be equivalent to sprite.x>0 and sprite.x<20, if you really wanted to take it extremely far something like, sprite.x={int|0,20} would qualify true when sprite.x was equal to an integer in that interval.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm going to bump this because there's been no replies and I still think it's a good idea, though my explanation probably didn't do it justice.

    Basically I was trying to make a custom platform movement and realised I absolutely hate using other sprites as detectors, there's too much fiddling around with hotspots and size changes etc, they just get annoying. So I tried to use the "object overlaps point" condition to replace these detectors, only to find its extremely limiting and unsuitable for this purpose.

    For a detector on the right, I set the single point to the midpoint of the sprite on the Y axis, and the furthest right point on the X axis, but because it's just a single point at your midpoint if you collide with something on your feet or your head it doesn't stop you. I thought for a second about looping it through every Y, then realised that was dumb since collision detection must handle a bunch of points at once anyway.

    You should be able to (at the very least) specify 2 X values, and 2 Y values, and it tests collisions within the region between them (a box), thus giving removing the need for invisible detectors.

    It might be nicer in fact to have >3 (x,y) coordinates, and test a polygon between them, allowing the creation of weirder shapes that might be more useful.

    The reason I was suggesting sets is that you could potentially describe different shapes other than some n sided polygon (like a circle). Though, the syntax would probably be ultra confusing, and might be hard to implement.

  • Yeah I can see how this would be a really useful idea... I guess I am so used to making detectors for stuff (thanks a lot Clickteam) that it's like second nature to use them for just about anything. This wold make things a lot easier and cleaner and you wouldn't have 50 different rainbow coloured objects, all named "Detector".

    ~Sol

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