.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   easy way to find the normal vector of the ladder (http://forums.bots-united.com/showthread.php?t=2346)

Whistler 23-07-2004 01:34

easy way to find the normal vector of the ladder
 
Code:

g_engfuncs.pfnTraceModel(m_vecWptOrigin, VecBModelOrigin(pLadder), point_hull, pLadder, &tr);

if (tr.flFraction < 1.0)
  // tr.vecPlaneNormal is the normal vector of the ladder now

m_vecWptOrigin is the origin of the waypoint, which is always "outside" the ladder.

pfnTraceModel() means a tracehull which is only blocked by the specified entity ("pLadder").

Pierre-Marie Baty 23-07-2004 16:15

Re: easy way to find the normal vector of the ladder
 
This is interesting indeed, although I never had problems determining the normal vector of a ladder using a normal TraceLine as far as I remember ???

Whistler 24-07-2004 01:17

Re: easy way to find the normal vector of the ladder
 
if you are using a normal traceline, it's usually not the ladder but the wall behind the ladder that blocks the traceline. and sometimes you will have trouble with this in ladders which don't have a wall behind it (like that one in cs_assault).

sPlOrYgOn 24-07-2004 01:32

Re: easy way to find the normal vector of the ladder
 
but if you have it like that it'll only hit the ladder and what if it hits the ladder from the wrong side?

Whistler 24-07-2004 01:55

Re: easy way to find the normal vector of the ladder
 
the start position is the waypoint origin, which is always at the right side unless the waypointer is bad one :)

sPlOrYgOn 24-07-2004 02:03

Re: easy way to find the normal vector of the ladder
 
well if that were true then there isn't any problem using traceline even if it hit the thing in the back..

Cheeseh 24-07-2004 13:19

Re: easy way to find the normal vector of the ladder
 
wouldn't a tracehull find the ladder?

Whistler 24-07-2004 13:45

Re: easy way to find the normal vector of the ladder
 
Quote:

Originally Posted by Cheeseh
wouldn't a tracehull find the ladder?

Yes, I'm sure ordinary tracehull with "head_hull" will find the ladder. but the "point_hull" won't find it.

Pierre-Marie Baty 25-07-2004 23:31

Re: easy way to find the normal vector of the ladder
 
umm yes, my bad.. TraceHull, that's what I meant in my post :)


All times are GMT +2. The time now is 12:11.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.