Translating Away3D 3D point to a 2D point in Starling framework

Get Adobe Flash player

The example above (you can rotate the cube by dragging your mouse) consist of 3 layers, a Starling background instance with a particle instance, an Away3D viewport with the rotating cube and a foreground Starling layer that has a line ‘attached’ to a segment of the Away3D cube.

Starling translates the updated 3D point from Away3D every frame through a static function called “GetVerticeWorldPosition”. That function returns the Vector3D of the segment requested on the Mesh. The Vector3D x and y properties can then be used in a 2D point.

The example used on this page is build in Flashdevelop and can be downloaded below.

comments powered by Disqus
mycreativity.nl

mycreativity.nl - all about my creations | copyright © 2009-2017 mycreativity