Search code examples
flashactionscript-3papervision3d

Papervision3D: Line3D updating onEnterFrame


I'm updating the start and end points of a Line3D object in Papervision3D. The end result works fine but there seems to be a lag from when I move the objects and for the line to redraw in the right position. I'm using the following code:

connectingLine.v0.x = startDisObj.sceneX;
connectingLine.v0.y = startDisObj.sceneY;
connectingLine.v0.z = startDisObj.sceneZ;
connectingLine.v1.x = endDisObj.sceneX;
connectingLine.v1.y = endDisObj.sceneY;
connectingLine.v1.z = endDisObj.sceneZ;

Is there a better way to do this?


Solution

  • I'm using singleRender() and it seems by adding an extra call to singleRender() before the above script but after the camera move has solved the problem.

    Thanks.