There doesn't seem to be a condition in Construct 2's Sprite object that tests if a point (x,y) lies within the sprite's collision polygon. I feel there are plenty of reasons why such a condition should exist natively in C2:
All in all, I think this would be a great addition to C2. I apologize if there are already simple approaches to finding whether a point overlaps an object, but I asked in the 'How Do I?' forum and no one seemed to know of any.
Thanks for considering my request!
check out this post.
You're in luck - I already added point collision tests for r137.
Develop games in your browser. Powerful, performant & highly capable.
Awesome! Great timing. I'm looking forward to the next release. Thanks Ashley!
Hi Ashley. Thanks for all the work you've done helping develop Construct. Is there any possibility we could see a feature implemented soon that lets you check the point at which the extremities of two objects collide? I am currently developing a game which requires me to return the x,y position of the place at which two physics objects touch/collide, both of which have complex bounding boxes made up of several collision points.
I can envision countless useful ways such a feature could be implemented into people's games. For mine I need to know the point of collision so that my character, which is a ball, can be made to 'jump' off of curved surfaces at a 90degree angle to them, but without knowing the point of collision it is impossible for me to assign a physics impulse on the ball away from the point of collision.
Be the answer 'yay' or 'nay' I would greatly appreciate hearing back from you on the matter. Thanks a bunch!
All too coincidental. I came to Scirra just now to search "check collision with point", and while I was typing that, it caught my eye that the most recent post in the General forum (seeing this from the main forum landing page) was in this thread.
Ashley, you say that you've implemented it into r137, great! When is that due to be released? Wait, just checked the release page, and wow it looks like it's out. I'm gonna give it a shot!
I see in the changelog for r139 (specifically r137:
display collision polygons in layout view;
How is this enabled, or where do we set the option to see these in layout view? Is it possible for troubleshooting & debugging to actually see it in the rendered game as well? Obviously I wouldn't leave it on for release, but I'm experiencing some collision issues I'd like to troubleshoot, and seeing the collision mask at runtime would be beneficial. But at the very least, how do I enable it in the layout view?
wizaerd under view
there is checkbox for collision polys
don't think option to view during runtime tho sorry
Thanx Dr... I was just coming here to say I had found it.
well glad to know you found it :)