I’m trying to render a LineSegment as a Sprite3D, i’ve extended SegmentSet and overridden updateTransform() and getRenderSceneTransform(camera:Camera3D):Matrix3D
using the code from sprite3D
this way:
override protected function updateTransform():void
{
super.updateTransform();
_transform.prependScale(_width, _height, Math.max(_width, _height));
}
override public function getRenderSceneTransform(camera:Camera3D):Matrix3D
{
var comps:Vector.<Vector3D> = camera.sceneTransform.decompose();
var scale:Vector3D = comps[2];
comps[0] = scenePosition;
scale.x = _width*_scaleX;
scale.y = _height*_scaleY;
_spriteMatrix.recompose(comps);
return _spriteMatrix;
}
But the line continues to be rendered in 3d.
What else i need to do?
I’m on the right track?
The SegmentPass needs to be edited?