Thread: some problems
View Single Post
some problems
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default some problems - 17-03-2004

Hi all !

Haven't been online for quite a few days.

I'm now trying to do something like what Stefan and Christan was doing in their old Realbot. (That amazing "Checking Waypoint connection" process). But I've got some problems now...

When I fire a TraceLine to an obstacle(eg. walls), The tr.pHit is just the "worldspawn" entity, not func_wall or so. So I can't determine its shape by using tr.pHit->v.absmin/absmax/size. Does this mean I have to fire another whole bunch of tracelines, or is there any way to dertermine the shape ?

Also, is this correct ?

Code:
bool IsOnSamePlane(Vector &vecPoint1, Vector vecNormal1, Vector &vecPoint2, Vector vecNormal2)
{
   vecNormal1 = vecNormal1.Normalize();
   vecNormal2 = vecNormal2.Normalize();
   if (vecNormal1 != vecNormal2)
	  return FALSE;
   return DotProduct(vecNormal1, vecPoint1) == DotProduct(vecNormal2, vecPoint2);
}
Thanks a lot !

P.S. Stefan, would you please give me some info or hints about how you did those things ? Of course you'll well credited if your information is useful Thanks a lot !
  
Reply With Quote