Getting nearest collision.

For questions about using Classic.

Post » Tue Dec 01, 2009 4:24 am

I was just wondering how it would be possible to get the collision that's closest to the Origin Point.

The Horizontal Line represents the Line that is used to collide and the Vertical Line is supposed to represent the collision point (along with the dot).




So could anyone tell me if this is possible? Hope I illustrated the idea well.

(Edit: Yes, this may be relevant to Defunct.)
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Tue Dec 01, 2009 9:34 am

I'm not sure if I know what you're talking about. :oops:

[quote:1mi2i4u8]I was just wondering how it would be possible to get the collision that's closest to the Origin Point.[/quote:1mi2i4u8]

By getting the collision you mean the X/Y coordinates of the point where that line collides with the wall or ummm... and in this context the origin point is supposed to be where that line is tagged on the player? Maybe because it's too early but in spite of those 2 images I can't figure out what you actually mean. :lol:
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Dec 01, 2009 10:48 am

[quote="PixelRebirth":6vroc7ug]By getting the collision you mean the X/Y coordinates of the point where that line collides with the wall or ummm... and in this context the origin point is supposed to be where that line is tagged on the player? Maybe because it's too early but in spite of those 2 images I can't figure out what you actually mean. :lol:[/quote:6vroc7ug]

I think that is what I wanted to know.

Explaining stuff has never been my strong suit. But I may have figured out how to perform what I was getting at...

LOLSOLVED.

As you see in this example, but I'm unsure of the lag potential of performing this among other things. If theres any optimised form of this, I'd like to know, until then, it's solved.

This was made in the latest, or next to latest, version of Construct. So events and objects might differ if your using older versions (Pre 0.99.6 or 0.99.62).
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Tue Dec 01, 2009 10:54 am

Yes, now I see what you meant.

Works like the instant hit laser example basically. Curious how this is of relevance to AWESOME BOT ADVENTURES... I mean DEFUNCT. :P
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests