![]() |
some problems
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) 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 ! |
Re: some problems
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 |
Re: some problems
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* :)
|
Re: some problems
Quote:
|
All times are GMT +2. The time now is 01:42. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.