View Single Post
v.absmin and v.absmax
Old
  (#1)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default v.absmin and v.absmax - 13-01-2004

So PM you and I had this convo on botmans forum:

Quote:
--------------------------------------------------
03/27/03 at 20:06:59 Reply by: PM (pm@racc-ai.com)
--------------------------------------------------
Normal, I'd say.
The BSP slicer aligns its slices taking the whole map bounding box as a reference. Thus, the center of the bitmap
will always correspond to the center of the map. But not to the center of the world !
Many maps are not centred around (0,0,0) actually.
--------------------------------------------------
03/27/03 at 21:03:35 Reply by: BAStumm (bs@bs-linux.com)
--------------------------------------------------
right so how might I attempt to guess at where the center is or what kind of offset to use or whatever. Must be a way, valve uses
an overlay (bmp file) in game for that one overview spectator mode.
--------------------------------------------------
03/27/03 at 21:47:09 Reply by: PM (pm@racc-ai.com)
--------------------------------------------------
Of course, all you have to do is to substract the coordinates of the center of the map's bounding box to the coordinates of your player.
The map (worldspawn) is model #0 in the BSP data, and entity #0 in the game.
v_relative_coords = v_absolute_coords - (INDEXENT (0)->v.absmin + INDEXENT (0)->v.absmax) / 2;
you get the idea...
But I am getting -1 for INDEXENT(0)->v.absmin.x and +1 for v.absmax.x and same for the Y versions of these values... Any ideas?







Last edited by BAStumm; 13-01-2004 at 02:32..
  
Reply With Quote