Hey Folks,
I'm using Away3D for some sort of Exporter of an existing System and
there occurs a problem I really can't find anything like a fitting
solution for. So I hope someone here has any ideas...
The problem is explained very fast: The system I want to export uses
rotations ALWAYS relative to the containers' LOCAL Coordinate system,
and not like we are used to by Away3D (rotationX, rotationY,
rotationZ) relative to its parent containers' coordinate system. I
know that there are methods that pretty well do the trick for me
(roll(), pitch(), yaw()). But that's the point: Later on I want to
tween the rotations. Methods are not tweenable. So I tried to create a
customized ObjectContainer3D (which contains propriate properties for
"local rotations") that inherits from ObjectContainer3D. The basic
Idea you can see here:
inheritance as usual, and then...:
public function set rotlocalX(rotX:Number):void{
pitch(rotX);
}
public function set rotlocalY(rotY:Number):void{
yaw(rotY);
}
public function set rotlocalZ(rotZ:Number):void{
roll(rotZ);
}
public function get rotlocalX():Number{
return ????????????;
}
public function get rotlocalY():Number{
return ????????????;
}
public function get rotlocalZ():Number{
return ????????????;
}
And now to the problem:
I don't know how to write the getters for those tree new properties.
All I inherit from (ObjectContainer3D) is private and so not usable
for me :-( Or do I think the wrong way here? This is the point: How
can I "get" the properties because the tweening engine (props to
"greensock") needs to "get" the properties somehow, too.
I hope someone understands my problem and can help me here.
Perhaps it's totally trivial and I'm just blocked??
Thank you guys in advance
Alex