Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
CL3D.AnimatorCameraModelViewer is not working

alext
Registered User
Quote
2012-03-07 14:36:38

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


niko
Moderator
Quote
2012-03-08 07:42:59

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.


alext
Registered User
Quote
2012-03-08 19:03:25

Thanks a lot working perfect.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact