View previous topic :: View next topic |
Author |
Message |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Mon Feb 08, 2010 11:46 am Post subject: Plane question |
|
|
I post this in the QC section simply because I code QC, and am planning to use this in a QC project, but the answer could be useful for anyone, and written in any programming language.
If I have a plane, and two vectors (could be on the same side of the plane, and the wanted result would be extended to "hit" the plane), and I want to find out the point in-between the vectors, on the plane. I've attempted to make it clearer by providing a picture below, hopefully imageshack doesn't choke:
 _________________ Look out for Twigboy |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Mon Feb 08, 2010 3:54 pm Post subject: |
|
|
why not just call a trace and have it print the distance? _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Mon Feb 08, 2010 5:47 pm Post subject: |
|
|
Ya a traceline would be the best option, and the point would be stored on the trace.endpos, i think off hand... |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Mon Feb 08, 2010 11:45 pm Post subject: |
|
|
It's not a physical plane in the traditional sense, not a part of the map, but one I've created via gamecode. You could say what I'm after is mimicking what traceline does in the engine, except in QC. Anyway, Tei seems to be on to something here, it looks like exactly what I'm after, haven't inspected it yet. Thanks! _________________ Look out for Twigboy |
|
Back to top |
|
 |
|