.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
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
Re: some problems
Old
  (#2)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: some problems - 17-03-2004

that code snippet should be right if you assume every plane if going thru 0,0,0. Planes are normally specified with the normal and then with the distance to the origin of your coordinate system ( It's called hessesche form I guess ), but this'd be 0 in your case I guess. so two possible planes, first checking if the normal is right at all, so we know that the planes are identical. ( if you have 2 planes which are principally identical, but their calculation was different, you might still get problem due to rounding in float operations )

checking the dotproducts should then be ok, too


  
Reply With Quote
Re: some problems
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: some problems - 17-03-2004

The only way to determine the shape of a wall with Half-Life is to read the BSP data. There's no other way. It also renders the "checking connection" step obsolete since there is no obstruction between a point and another in a BSP volume. At this cost you might consider using a navmesh instead since that's exactly it *hint* *hint*



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: some problems
Old
  (#4)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: some problems - 23-03-2004

Quote:
Originally Posted by Pierre-Marie Baty
The only way to determine the shape of a wall with Half-Life is to read the BSP data. There's no other way. It also renders the "checking connection" step obsolete since there is no obstruction between a point and another in a BSP volume. At this cost you might consider using a navmesh instead since that's exactly it *hint* *hint*
Thanks for reply (as well as @$3.1415rin's). I have read your RACC Template 2 but because I'm still a beginner I don't quite understand the BSP stuff Also I just want to do something myself. So it may be not a good idea to use your navmesh code. Actually I changed the way of analyzing the map with some complicated maths stuff. My new method is: I ripped out some parts of Quake1 Engine source and use it to simplate player movement. Now it works very well at places needn't ducking/jumping and climbing ladders. But I think those things are easy to solve as long as I try to

Last edited by Whistler; 23-03-2004 at 11:25..
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com