Author Topic: Static Shape always faces north  (Read 580 times)

For some reason whenever I create a static shape it faces north no matter what I put in after the X, Y, and Z.
Code: [Select]
$DirectionNorth = "1 0 0 0";
$DirectionEast = "0 0 1 1.5708";
$DirectionSouth = "0 0 1 3.1416";
$DirectionWest = "0 0 -1 1.5708";
$DirectionUp = "1 0 0 1.5708";
$DirectionDown = "-1 0 0 1.5708";
Code: [Select]
new StaticShape()
{
position = %x SPC %y SPC %z SPC $DirectionEast;
scale = "1 1 1";
dataBlock = SomeShape;
};
Help is much appreciated.

Position is only XYZ coordinates.

Try calling this method on the static shape you create:
Code: [Select]
someStaticsShape.setTransform(%x SPC %y SPC %z SPC $DirectionEast);

Code: [Select]
$DirectionNorth = "1 0 0 0";
$DirectionEast = "0 0 1 1.5708";
$DirectionSouth = "0 0 1 3.1416";
$DirectionWest = "0 0 -1 1.5708";
$DirectionUp = "1 0 0 1.5708";
$DirectionDown = "-1 0 0 1.5708";
Code: [Select]
new StaticShape()
{
position = %x SPC %y SPC %z;
rotation = $DirectionEast;
scale = "1 1 1";
dataBlock = SomeShape;
};
Your welcome.

Pretty sure the rotation variable of the object has to be in degrees not radians

Pretty sure the rotation variable of the object has to be in degrees not radians

er, no

That's what I get for looking at System_PropSys for coding help.