Material mouse click coordinates

Software: Away3D 3.x

jonnybegood, Newbie
Posted: 12 February 2013 06:29 PM   Total Posts: 1

Hi,

I have a sphere with a BitmapMaterial applied as its material. When a user clicks on the sphere I can get the x,y,z coordinates of where the sphere was clicked using the MouseEvent3D event.

The problem is that I need to convert that 3d world coordinate to a 2d coordinate on the material’s bitmapdata.

So if you imagine unwrapping the material from the sphere so its a rectangle again and extract the bitmapdata from it, what is the x and y co-ordinate of that image where the mouse was clicked?

I have spent the last few days trying to work this out but have run out of ideas, so any help would be greatly appreciated.

I am using away3d v3.6 btw.

Many Thanks

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X