HoverController alone not rendering

Software: Away3D 4.x

inSertCodE, Sr. Member
Posted: 21 November 2011 07:39 PM   Total Posts: 105

The HoverController doesn’t seem to call rendering when alone.

For example I have a scene with 1 plane without light or anithing.

When I use hover:

if (_MouseMove) {
_cameraController.panAngle = 0.3 * (stage.mouseX - lastMouseX) + lastPanAngle;
_cameraController.tiltAngle = 0.3 * (stage.mouseY - lastMouseY) + lastTiltAngle;
}
_view.render();

The camera doesn’t rotate. I’ve traced the tilt and pan angles and I noticed that the values are changing properly. So it obviously rotates the camera but doesn’t render it.

On my next step I added a line that should activate the renderer.


if (_MouseMove) {
_cameraController.panAngle = 0.3 * (stage.mouseX - lastMouseX) + lastPanAngle;
_cameraController.tiltAngle = 0.3 * (stage.mouseY - lastMouseY) + lastTiltAngle;
}
Plane.x += 1;
Plane.x -= 1;
_view.render();


...and now it works. It also works with combination of everything that activates the renderer (light, move object…) but I think it should also work alone.

   

Piwie, Newbie
Posted: 24 November 2011 09:30 AM   Total Posts: 4   [ # 1 ]

Yep, i had this weird bug once (even if cameraController.autoUpdate is set to true) .
Before

_view.render(); 


use :

_cameraController.update(); 
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X