How to draw a smooth orbit in away3D 4.0?

Software: Away3D 4.x

Welborne, Newbie
Posted: 09 November 2011 12:50 AM   Total Posts: 5

Here is a Actionscipt Class named Pathings.It made a path Animation,using PathExtrude etc.But I just wanna a smooth orbit.I have succeeded in drawing lines with an array(a simple copypaste from Prefab3D’s .awp path export files) .But it was sharp with ugly sawtooth(just look the Attachments).Any idea to help me make the line or the orbit smooth and be Anti-Aliasing?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 09 November 2011 01:18 PM   Total Posts: 1265   [ # 1 ]

On the drawing side:
We have no curveSegment yet.
So if you need to display the path, you need to implement a pointOnCurve routine, and draw each segment with this series of points. The higher the number of points, the smoother.
PathUtils.as has a method doing just that: getPointsOnCurve

On the path side.
if you ment that its sawtoothed because of the definition itself, make sure you hit the smoothpath btn in Prefab or if you use the Path class, after you have passed the data, invoke the Path.smoothPath() method.

 

   

Welborne, Newbie
Posted: 10 November 2011 03:58 AM   Total Posts: 5   [ # 2 ]
Fabrice Closier - 09 November 2011 01:18 PM

On the drawing side:
We have no curveSeg yet.
So if you need to display the path, you need to implement a pointOnCurve routine, and draw each segment with this series of points. The higher the number of points, the smoother.
PathUtils.as has a method doing just that: getPointsOnCurve

On the path side.
if you ment that its sawtoothed because of the definition itself, make sure you hit the smoothpath btn in Prefab or if you use the Path class, after you have passed the data, invoke the Path.smoothPath() method.

Fabrice ,your suggestions turn out useful,thanks.Now,I have some advanced questions.Can path editor draw a full real circle without any breakpoints in preFab ?And are there any methods to regard the path I draw as a whole group and rotate it in any angle ?I am unable to draw this circle.Actually,I can not splice the beginning and the end point of the path at all.See the image below.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X