Walk around in space
Hi everybody,
I make 3d models with away3d and import them into flash builder.
I can rotate the models like this:
public function update(e:Event):void
{
// re-render viewport
var cameraSpeed:Number = 0.3; // Approximately same speed as mouse movement.
if (move)
{
cam.panAngle = cameraSpeed*(stage.mouseX - lastMouseX) + lastPanAngle;
cam.tiltAngle = cameraSpeed*(stage.mouseY - lastMouseY) + lastTiltAngle;
}
cam.hover();
view.render();
}
private function MouseDown(event:MouseEvent):void
{
lastPanAngle = cam.panAngle;
lastTiltAngle = cam.tiltAngle;
lastMouseX = stage.mouseX;
lastMouseY = stage.mouseY;
move = true;
}
But now I would like to walk around in space (just as you can see here: http://www.youtube.com/watch?v=AsOlw4iIj8E&feature=player_embedded)
I don't think it's very difficult and I think I have to change the code above but I have no idea how.
Does anybody can give me a hint how to do that?