LookAtController access invalid method lookAtPosition

Software: Away3D 4.x

jcarpe, Newbie
Posted: 03 August 2012 05:54 PM   Total Posts: 8

I am having a problem where after I instantiate a look at controller for my camera I then try and call the method lookAtPosition( Vector3D() ) on it, but the error I get is as follows:

1195: Attempted access of inaccessible method lookAtPosition through a reference with static type away3d.controllers:LookAtController.

As far as I can tell, the LookAtController is not static, nor is the lookAtPosition method, so I am not really sure why this is happening.

_lookAtController = new LookAtController_camera3D );
_lookAtController.autoUpdate true;

// This is the line where the error occurs.
_lookAtController.lookAtPosition( new Vector3D00) ); 

 

   

Richard Olsson, Administrator
Posted: 04 August 2012 08:39 AM   Total Posts: 1192   [ # 1 ]

The lookAtPosition property is not a function, but a read-write property, and should be used as such:

_lookAtController.lookAtPosition = new Vector3D(0,0,0); 
   

jcarpe, Newbie
Posted: 08 August 2012 05:33 PM   Total Posts: 8   [ # 2 ]

Heh… Thank you…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X