Game Development Community

About SetFriction doesn't work

by Bin LU · in Torque Game Builder · 07/04/2009 (5:55 pm) · 1 replies

In my platform game.
My platform physics setting is:
%theBlock = new t2dAnimatedSprite() {
animationName = %animationName;
canSaveDynamicFields = "1";
Position = %blockLoc;
size = %blkSize;
superclass = "blockClass";
class = %Klass;
CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
CollisionDetectionMode = "POLYGON";
CollisionResponseMode = "CLAMP";
worldLimitCallback = true;
WorldLimitMode = "NULL";
WorldLimitMin = "-49.842 -50.464";
WorldLimitMax = "49.842 50.464";
};
%theBlock.setFriction(0.8);

and the hero controlled by player's setting is:
CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionPhysicsSend = "1";
CollisionPhysicsReceive = "1";

when the hero running on the surface of platform,the friction seems doesn't work, because I use the
%hero.setConstantForceX(-150);
to make hero running, but whatever friction is,the hero will running at the same speed.

Anybody can help me?

Thank you very much.