Game Development Community

Switching on debugging mode for collision polygons

by Alexander Bierbrauer · in Torque Game Builder · 05/14/2006 (4:58 am) · 2 replies

Hey guys,

I wann see the collision polygons but I can't turn them on like stated in the manuals. In the manuals they are using this method: $player.setDebugOn(BIT(5));

Here's my code:
function createPLayer()
{
$player = new t2dAnimatedSprite()
{
scenegraph = t2dscene;
falling = true;
jumping = false;
jumpStartPosY = 0;
};
$player.setSize($GAME::PLAYER_SIZE_X SPC $GAME::PLAYER_SIZE_Y);


$player.setCollisionActive(true, true);
$player.setCollisionPhysics(true, false);
$player.setCollisionResponse(CLAMP);
$player.setCollisionCallback(true);
$player.setCollisionMaxIterations(2);
$player.setLayer($GAME::PLAYER_LAYER);
$player.setGraphGroup($GAME::PLAYER_GROUP);
$player.setCollisionMasks(BIT($GAME::BLOCK_FIELD_GROUP), BIT($GAME::BLOCK_FIELD_LAYER));
$player.setCollisionPolyCustom(4, "-0.2 -0.5 0.2 -0.5 0.2 1.0 -0.2 1.0");


setPlayerFalling($player);

$player.setDebugOn(BIT(5));
}

the error message:

t2dSceneObject::setDebugOn() - Invalid debug mode specified (32); skipped!


any help ??

#1
05/14/2006 (9:11 am)
That has changed quite some time ago (one of the alpha builds). Instead of
t2dScene.setDebugOn( BIT(0) | BIT(1) | BIT(2) );
you now write
t2dScene.setDebugOn( 0, 1, 2 );

Can you tell us where you got the old info from? Then it can be updated.

-Michael