Measuring distances.

Get help using Construct 2

Post » Sun Oct 23, 2016 10:30 am

For the lasers in my game I measure the distance between the start of the laser and the first solid object it collides with. I.e set laser width to distance(weapon.imagepointX(1),weapon.imagepointY(1),solid.imagepointX(0),solid.imagepointY(0)) where weapon imagepoint 1 is the point where the laser is fired and solid imagepoint 0 is usually the centre of the object. This sets the width to a bit further into the solid object rather than just on the border. Is there a way to measure the distance from the point where two collision polygons intersect? Or does anyone have an alternative to find the distance?
B
14
S
3
Posts: 55
Reputation: 912

Post » Sun Oct 23, 2016 9:10 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests