View Single Post
easy way to find the normal vector of the ladder
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default easy way to find the normal vector of the ladder - 23-07-2004

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").
  
Reply With Quote