Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, first of all thanks a lot js library. Good stuff. I need your help because I have no idea what I do wrong. I started from tutorials lessons included in a zip file I downloaded and in tutorial3 where you show how to add your own node to the scene I tried to replace FPS camera with modelviewer camera. But it's not working. Model is displayed but I cannot rotate it. I just replaced a few lines of code from this tut with these ones: //mynode.addAnimator(new CL3D.AnimatorRotation(new CL3D.Vect3d(0, 0.6, 0.8))); - I removed the rotation var cam = new CL3D.CameraSceneNode(); cam.Pos.X = 50; cam.Pos.Y = 20; cam.Pos.Z = -20; cam.setTarget(new CL3D.Vect3d(0, 0, 0)); scene.getRootSceneNode().addChild(cam); scene.setActiveCamera(cam); var animator = new CL3D.AnimatorCameraModelViewer(cam, engine); cam.addAnimator(animator); its not working no matter I change radius or rotation speed. Also a few things I would like you to consider: 1. The dynamic lighting is working only for EMT_SOLID material type. Can you make it work also for other types, especially EMT_LIGHTMAP material so i can for example have a scene with baked ambient oclussion and additionally a dynamic light source? 2. In coppercube I found a small mistake - my monitor resolution is 1024x768 and I cannot make it bigger. The menu for baking lightmaps is half cut: http://www.alexsoft.com.pl/coppercube.gif |
||||
|
I just tried out, and had the same result as you. After being confused a bit, I finally found out: Simply set the rotation speed to something quite big. The default setting is set so that the camera barely moves. Use something like animator.RotateSpeed = 10000; and it will move. The idea about the ambient occlusion is a nice one. Considering it for one of the next updates. |
||||
|
Thanks a lot working perfect. |
|