I have 3ds model and extrude on scene. I want to set camera like in
this demo
http://agit8.turbulent.ca/bwp/2009/01/22/spring-physics-powered-3d-camera-for-away3d-and-papervision/.
But my springcam don't so... when i rotate my model (model.rotationZ)
to turn left or right camera rotates whole world around:( and i wonder
how low FPS with springcam (10), with HoverCamera it was about 30-40.
sorry for my bad english.
this is part of my code that controls camera and model:
var camera:SpringCam = new SpringCam();
3dmodel.scale(400);
camera.target = 3dmodel;
camera.mass = 10;
camera.damping = 10;
camera.stiffness = 4;
camera.y = 10000; //whithout it problem is still there
camera.z = 10000; //without it too
camera.lookAt(3dmodel.position);
camera.lookOffset = new Number3D(0,0, 0);
camera.positionOffset = new Number3D(0, -50, 40);
function onEnterFrame(e:Event):void
{
...blalblabla...
//left - right
if (keysDown['37'] == true)
{
3dmodel.rotationZ -= 2;
}
if (keysDown['39'] == true)
{
3dmodel.rotationZ += 2;
}
...blalblabla.....
carRadians= ((3dmodel.rotationZ)/360)*
(2*Math.PI);
3dmodel.x += Math.cos(carRadians) *
carparams.speed;
3dmodel.y += Math.sin(carRadians) *
carparams.speed;
view.render();
}
result you can see here http://77.108.98.131/test.html