ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator Camera problem using CL only
person icon
KK
Guest
Quote
2011-08-09 13:42:14

I need quick help at this. I want to set up a cam using Copperlicht only. I have the script from the tuts but now I can“t pan the view.
I know this should be working as soon as I create a cam in Coppercube - but I would like to try it without CC...
var cam = new CL3D.CameraSceneNode();
cam.Pos.X = 0;
cam.Pos.Y = 325;
cam.Pos.Z = 0;
cam.setFarValue(10000);

// add an animator which makes the camera move by keyboard and mouse input

var animator = new CL3D.AnimatorCameraFPS(cam, engine);

animator.MoveSpeed = 1;
animator.RotateSpeed = 150;
animator.MaxVerticalAngle = 0;
animator.setLookByMouseDown(true); // look when the mouse is moved

cam.addAnimator(animator);

scene.getRootSceneNode().addChild(cam);
scene.setActiveCamera(cam);

// add the collision response animator to collide against walls

var colanimator = new CL3D.AnimatorCollisionResponse(
new CL3D.Vect3d(40,5,40), // size of the player ellipsoid
new CL3D.Vect3d(0,0,0), // gravity direction
new CL3D.Vect3d(0,318,0), // position of the eye in the ellipsoid
scene.getCollisionGeometry());

cam.addAnimator(colanimator);
Any ideas? Thx

person icon
niko
Moderator
Quote
2011-08-10 11:44:30

hm, works for me. Maybe there is something missing or you are swalling a key event or similar?

person icon
KK
Guest
Quote
2011-08-10 15:26:51

Nope. No key events. Above is the entire script for the cam. I can move by key events but unable to pan the view by mouse (click&drag).

It works with "animator.setLookByMouseDown(false);" but I would like to click and drag..

mmmhh.. strange.


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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