Here’re my 2 problems:
1-I did a menu moving in 3d following my mouse movement but with boundaries to keep the front in face of the user. It’s working well but when it reaches the boundaries on X or Y, the stop is quite too hard. I was thinking it should be great if the menu was always moving… following the mouse within the boundaries or following a new path if the mouse is out. COuld i put a script after the “else” to make the rotation go on, within my boundaries, but without the mouse movement since the mouse will be in a corner or something like that ?
Here’s the script now:
var xDist:Number = mouseX - stage.stageWidth * 0.5
var yDist:Number = mouseY - stage.stageHeight * 0.5
if((karate.rotationY - (xDist * 0.001) >-10)&&(karate.rotationY - (xDist * 0.001) <10))
karate.rotationY -= xDist * 0.001;
karate.rotationY -= xDist * 0.000;
if((karate.rotationX - (yDist * -0.001) >-5)&&(karate.rotationX - (yDist * -0.001) <5))
karate.rotationX -= yDist * -0.001;
karate.rotationY -= yDist * 0.000;
2-My second question is about my menu buttons. I want them to be on lower layer cause it help creating my 3d scene cause sometimes it is a part cover by my image on the top. But the buttons stop to be clickable when they are behind something (even a part behind). I want them to be clickable at all time. The strange thing is i checked out in the forum and a lot of people have the opposite problem… their buttons still work. How can i make mine clickable ?
I would really appreciate your help guys