Ok, maybe I am not getting something, but I seem to always have the hardest time setting up a scene in Papervision3D to work the way I want it. I just want a very basic, simple setup to start from most the time. Then from there I can build on it. Please feel free to add your comments below for how wrong I am doing things, or how I am about to promote back practices.
1. (x, y) of the Papervision scene is the center of the stage. (x,y of flash is the top left), so I made a convertPosition function that moves it. I am sure this will totally screw things up once you start moving the camera around, but most the time when I am working on a Papervision project I just need a static camera, and the objects do minimal movement.
2. When you place an object (like a cube) in the scene, “front” is actually facing away from the camera. So I have setup the camera so it is on the other side of the objects (front = front, top = top, etc). This way my brain can comprehend.
3. Materials!!! I know this one is simple, but I always forget how to apply each type of material, so I setup a Material list for my sample cube that uses some of, what I think, are the more common Materials. I also created my own functions for making new materials quickly.
4. Swapping materials. I included one function that swaps a color material on the cube. Real basic, but you can build from there if you want to pass in your own material, etc.
Please note that I based this off of Tyler Egeto’s Basic World Setup Tutorial, so much credit goes to him. I simply built on what he had to address some of my own issues, and I have left a lot of his comments in there because he did such a good job of explaining things in detail.
If you have any of the same problems I do and want a place to start from go ahead and grab my source.