Need to put markers on a papervision3d model (esphere) on execution time (flash/flex)
-
03-10-2020 - |
سؤال
I'm using papervision3d to load a 3D sphere with the world texture on a Flash project. I want to know how can I put a marker on the model given a coordinate? Example: two angles, and with marker I refer to a simple movieclip or similar. Thanks.
المحلول
You will need to convert to from spherical coordinates(uses 2 angles and a radius) into cartesian coordinates(x,y,z).
(source: psyked.co.uk)
Luckily there is a nice article out there that explains this using Papervision.
Someone else also recorded a video tutorial.
HTH
نصائح أخرى
One thing you can do is to place another sphere at the same origin with a radius slightly larger with a BitmapMaterial. Then you can draw directly on the BitmapMaterial according to a location mapped from the sphere. Where you're mapping spherical coordinates to a specific (u,v) on your bitmap.
Your "two angles" would be your spherical coordinates and the (u,v) coordinates would be the top-left relative coordinates on the bitmap.