bounding boxes
by Desmond Fletcher · in Torque Game Engine · 11/13/2001 (4:18 pm) · 5 replies
1. In map2dif->EditGeometry.cc is the following:
void EditGeometry::createBrushPolys()
{
if( mPerformExtrusion ){
doGraphExtrusions(mStructuralBrushes); // (NavGraph.cc)
doGraphExtrusions(mDetailBrushes);
mMinBound = Point3D(1 << 30, 1 << 30, 1 << 30); // Needed RE the
mMaxBound = -Point3D(1 << 30, 1 << 30, 1 << 30);
What does the left shift evaluate to? And how is this related to geometry scale (eg. 32) in the map editor?
2. In player.cc, I assume the boxsize values below represent meters? If true, this makes the player about 39" x 39" x 89.7" (No wonder he won't fit through my halflife doors from converted maps :)
PlayerData::PlayerData()
{
...
// size of bounding box
boxSize.set(1,1,2.3);
void EditGeometry::createBrushPolys()
{
if( mPerformExtrusion ){
doGraphExtrusions(mStructuralBrushes); // (NavGraph.cc)
doGraphExtrusions(mDetailBrushes);
mMinBound = Point3D(1 << 30, 1 << 30, 1 << 30); // Needed RE the
mMaxBound = -Point3D(1 << 30, 1 << 30, 1 << 30);
What does the left shift evaluate to? And how is this related to geometry scale (eg. 32) in the map editor?
2. In player.cc, I assume the boxsize values below represent meters? If true, this makes the player about 39" x 39" x 89.7" (No wonder he won't fit through my halflife doors from converted maps :)
PlayerData::PlayerData()
{
...
// size of bounding box
boxSize.set(1,1,2.3);
#2
(I think it's the latter, no ?)
11/15/2001 (9:32 pm)
does that bounding box size refer change the rendered size of the palyer in relation to the terrain and other objects ? or does it only change the collision detection, leaving the player visually just as large as before...?(I think it's the latter, no ?)
#3
// Clocks out
www.flashthunder.com
11/17/2001 (1:35 am)
Yep, its the latter, it does not change the size of the model.// Clocks out
www.flashthunder.com
#4
11/17/2001 (9:37 am)
well, i changed the bboxsize and recompiled but i still can't get the player through the doors--do i have to also rebuild the player model with a smaller collision box?
#5
// size of bounding box
boxSize.set(1,1,2.3);
To something smaller.
Also type this in the console, it will let you see the bounding boxes ingame.
$GameBase::boundingBox = true;
// Clocks out
www.flashthunder.com
11/17/2001 (9:49 am)
Just change this line in player.cs:// size of bounding box
boxSize.set(1,1,2.3);
To something smaller.
Also type this in the console, it will let you see the bounding boxes ingame.
$GameBase::boundingBox = true;
// Clocks out
www.flashthunder.com
Torque Owner Lewis Bruck
The sizes in player.cs are in meters. I made mine smaller so my doors didn't look like they belonged on a barn (one day I'll have a shorter character NOT in power armor, once I learn MilkShape :-)