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 ??
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 ??
#2
tdn.garagegames.com/wiki/Torque_2D/Reference_Guide
thanx for the quick reply
05/14/2006 (10:09 am)
I've got the information from the TDN: tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerAnimationtdn.garagegames.com/wiki/Torque_2D/Reference_Guide
thanx for the quick reply
Torque Owner Michael Woerister
you now write
Can you tell us where you got the old info from? Then it can be updated.
-Michael