Super Simple Problem but I'm dumb as a doornail atm
by CdnGater · in Torque Game Engine · 07/24/2004 (11:16 am) · 4 replies
I know this is simple but I can't get my mind around it.
I want to see if 'c' is behind plane 'p' from my point 'a'.
To create the plane I do
Btw, this is using Point3F.
Edit: The problem is, I dont see the results I would expect.
p c
b
a pI want to see if 'c' is behind plane 'p' from my point 'a'.
To create the plane I do
PlaneF p(b, (b - a));
if (p.whichSide( c ) == PlaneF::back)
{
// do something
}
{
// do something else
}Btw, this is using Point3F.
Edit: The problem is, I dont see the results I would expect.
#2
This is burried deep in my application. I don't want to say what my application is about, so I will describe the results as if it was part of starter.fps.
I have a house ('b') surrounded by campfires at 100 units away (multiple 'c') . Player ('a') should only see the campfires that in front of the plane of the house. As he walks around, he should still only see the campfires that are between him and the house. Now if he could magical fly, once directectly over the house, he should see the ring of campfires.
Now what do I get,
I get different things for different experiments.
- Sometimes I see all the campfires and as I get closer, they all vanish.
- Sometimes it looks like its working, but as I move around, the ones shown vanish and none re-aprear.
It all boils down to, how do I create Pependicular Plane from points 'b' and 'a' ? That is what is elduing me.
07/24/2004 (12:10 pm)
Bah, I knew someone was going to ask me that..This is burried deep in my application. I don't want to say what my application is about, so I will describe the results as if it was part of starter.fps.
I have a house ('b') surrounded by campfires at 100 units away (multiple 'c') . Player ('a') should only see the campfires that in front of the plane of the house. As he walks around, he should still only see the campfires that are between him and the house. Now if he could magical fly, once directectly over the house, he should see the ring of campfires.
Now what do I get,
I get different things for different experiments.
- Sometimes I see all the campfires and as I get closer, they all vanish.
- Sometimes it looks like its working, but as I move around, the ones shown vanish and none re-aprear.
It all boils down to, how do I create Pependicular Plane from points 'b' and 'a' ? That is what is elduing me.
#3
07/24/2004 (12:25 pm)
Oh never mind, I told you I was DUMB as a DOORNAIL. I forgot to add the position of 'b' to each instance of 'c'. I thought I had already done that. But I hadn't! Now it works..
#4
07/24/2004 (7:22 pm)
Ahhh... There ya go! :)
Associate Kyle Carter