Author Topic: Item not collisioned.  (Read 1120 times)

I'm telling it to collision but it just won't and the item does have collision because when i spawned it in F11 i couldn't walk through it.

Code: [Select]
function serverCmdBPlatform(%client){
%Platform = new Item()
{
datablock = BPlatformItem;
rotation = "0 1 0 90";
};
%Platform.canPickup = 0;
%Platform.setScale("5 5 0.3");
%Platform.static = 1;
%Platform.collideable = 1;
%Platform.setTransform(setWord(%client.player.getTransform(), 2, getWord(%client.player.getTransform(), 2) + 2));
%Client.BPlatform = %Platform;
}

The rotation isn't working either.

Try using a static shape? (if that would work for whatever your trying)

Code: [Select]
Register object failed for (null) of class Static Shape.

datablock StaticShapeData(bPlatform)
{
 shapeFile = "DTS PATH HERE";
};

function serverCmdBPlatform(%client){
if(!isObject(%client.player)){return;}
if(isObject(%client.bPlatform)){%client.bPlatform.delete();}
%Platform = new StaticShape()
{
 datablock = bPlatform;
 position = vectorAdd(%client.player.position,"0 0 2");
 scale = "5 5 0.3";
};%client.bPlatform = %platform;
}

Code: [Select]
rotation = "0 1 0 90";last time I checked rotation is 3 numbers. :cookieMonster:
try,
Code: [Select]
rotation = "0 0 90";

Check F11, dunno what the extra dimension's for.

If you want more information on this, Torque actually uses quaternion rotation.  Check out the article on Wikipedia.

http://en.wikipedia.org/wiki/Quaternion#Rotation_group