HoverController?

Software: Away3D 4.x

kimonocow2, Newbie
Posted: 29 May 2012 05:52 PM   Total Posts: 2

Basically I’m trying to figure out how to do something like this
http://stage.makaimedia.com/away3d/bear/

The guy took the polar bear example and made a hover camera for it.

well, it was back in October and now, it seems, his source code is outdated.

can someone please explain the basics of using the currently built-in
controller classes to make a camera that hovers over an object in 3rd person
which turns with and moves with the object?

Once I figure out all this away3d stuff I plan to write an easily understandable tutorial series on it, For both increasing my own understanding of what I’ve learned, and helping out others since the new away3d 4.0 seems to be wanting for more tutorials. but for now I’m just trying to figure out the basics.
Thanks again.

   

Samuel Girardin, Member
Posted: 29 May 2012 07:22 PM   Total Posts: 74   [ # 1 ]

https://github.com/away3d/away3d-examples-fp11/blob/master/src/Intermediate_CharacterAnimation.as

uptodate with away3D4 -> https://github.com/away3d/

Samuel

   

kimonocow2, Newbie
Posted: 30 May 2012 02:01 PM   Total Posts: 2   [ # 2 ]

Ok so between the two source codes for the different versions of the polar bears I was able to alter the code to work for away 3d 4.0 (why can’t we just call it away 4d?)  and have the camera type hover. The only problem is after much experimentation I couldn’t get the same camera type to work in my own project. I’m also not sure what even makes the polarbear move forward in the example as the updateMovement function seems to only deal with animation, and the part that deals with checking for which keys are down doesn’t seem to have anything about increasing the polarbear’s position by any x y or z.

//neccesary imports
import away3d.cameras.*
import away3d.controllers.*;

            
//constructor
                        
scene = new Scene3D();
   
   
camera = new Camera3D();
   
camera.lens.far 5000;
   
camera.lens.near 20;
   
camera.500;
   
camera.0;
   
camera.lookAt(new Vector3D(001000));
    
   
view = new View3D();
   
view.scene scene;
   
view.camera camera;

           
//on enter frame if mesh is true
                  
cameraController.panAngle mesh.rotationY

So as far as I can tell, this is all the code in the polarbear class that deals with the camera. but when I add this same material to my own project
(substituting mesh for my own cube made with cubeGeometry) the camera gets wacked out and I have no Idea what’s going on.

the polarbear class seems well documented except for the part about how the camera is actually working or how the bear is actually moving

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X