Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
What's the best way to get the x and y value of the point where two objects overlap? Or is this possible? Like a point of collision type thing.
be more specific, which types of object intersects: line/line, line/circle, circle/circle, line/convex polygon intersection...
This is pretty tricky. Let me see if I can work something out...
Hooray, I just did a math!
Here you are, sir!
Awesome! Thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />
Develop games in your browser. Powerful, performant & highly capable.
here's another solution which counts line segments (not "infinite" lines)so line segments intersect not only because they are not parallel..
edit: drag line end points
I would think that self.x< object2.x ?self.x+(distance(self.x,self.y, object2.x,object2.y)/2) :self.x-(distance(self.x,self.y, object2.x,object2.y)/2) would work.
Since distance() is based on the hotspots.
newt, not sure what you're getting at there. I'm interested...
The distance() between two points divided by 2, will give you a radius that you can use to get that x.
That is if both objects are of the same width, and height.
sqiddster could you re-seed the link to the example you provided in this post? :D
I'm looking for a simple as posible way to achieve this (I opened a topic)
Sargas try this.
sqiddster oh, that's awesome man, think it will work :3