Any plans to upgrade the collision detection?

0 favourites
  • 8 posts
From the Asset Store
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • Any chance of getting something like this in C2?

    As others have posted in the past, the collision detection for C2 is pretty unreliable. Small objects, fast moving objects, changing window size during game, all cause objects to miss their collision. Other engines such as Box2D and Unity have systems that take into account, so it's disappointing to see C2 relying on the old 'teleport the sprite each frame and hope it hits' method, especially when it's being used on platforms as unreliable as mobile.

    Are there any plans on upgrading collisions to C2, or is the collision system seen as finished? I have a few features in my game that would benefit wildly from this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That would be nice.

  • Ahh raycasting <img src="smileys/smiley27.gif" border="0" align="middle" />

  • You can implement something like this yourself with events, but I guess we need to add Classic's old 'instant hit' or exact-collision bullet behavior feature back to C2.

  • You can implement something like this yourself with events

    R0j0hound suggested something similar a while back using the player position and lerps. It works pretty well, but given a large gap or small enough sprite, unless you increase the loop to a really high level it's still possible the lerp doesn't hit the intended object. Ray casting would fix this issue, but while I was able to get some basic versions of this working in C2 I just can't get the logic working 100%.

    but I guess we need to add Classic's old 'instant hit' or exact-collision bullet behavior feature back to C2.

    That would be fantastic if you could!

  • And for more than 4 points collision polygon ?

    Is it planned for future ?

  • nd for more than 4 points collision polygon ?

    Is it planned for future ?

    You can already do this. Right click on one of the points and click "add point".

  • R0j0hound suggested something similar a while back using the player position and lerps. It works pretty well, but given a large gap or small enough sprite, unless you increase the loop to a really high level it's still possible the lerp doesn't hit the intended object.

    I think the right logic is to step the object by its size, rather than by a percentage distance. That will always hit any obstacles in the way, and I think is how Classic did it.

    If it's a rectangle, an alternative is just to stretch it in to a line between its start and end points (by settings its width to the distance and its angle to the angle between the points). If that big box touches anything, the object would also collide along the way (although it doesn't tell you where it collided, only if it did, but it's a lot faster than loads of intermediate collision tests).

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