Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Plane question

| Inside3d Forums Forum Index -> QuakeC Programming

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 |

Posted: Mon Feb 08, 2010 2:38 pm Post subject: |

any random plane, or a wall ? maybe a wall is easier ... here is some math for any plane: http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 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 |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group