there is a class called TimeBase in animators package
its made especially for this.
basically when you now say camera y+= value;
its adding the same amount of value each enterframe.
so if the machine plays faster than another or if like in your case
poor geoemrty increases fps, it alter the motion.
the Timebase class work differently
you pass a fps rate to it
then your camera property will be added value in scale of time you set
if the fps rate is high, the value added will be lower
if fps is lower than fps rate set the value will be greater
as a result the motion is much smoother.
so once you have decalred your timebase instance in your class
in enterframe
you just have to do: camera.y += timeVal(value);
Fabrice
On Oct 2, 2009, at 11:51 PM, [email protected] wrote:
Not sure if u can. Might be a way to pre cache the sequence in
memory before showing on screen.
J. Rowley - Director
Vanilla Brand Ltd
+44(0) 7810 811110
-----Original Message-----
From: Crisstyle <[email protected]>
Date: Fri, 2 Oct 2009 14:47:27
To: away3d.dev<[email protected]>
Subject: [away3d] Need Help Stabilizing The Framerate
Im having a major problem controlling the framerate in my Away3D
scene. Here are the details:
I built a 3D city where the camera moves down the street for 60
seconds.
I used Planes for the buildings and road (since the user cannot turn)
and used BitmapMaterials for the graphics. (so everything on screen is
BitmapMaterial). I have about 100 meshes on screen.
My problem is this:======================
The camera movement is fine at first, then as I proceed down the
street and less and less buildings are on screen, the FPS reading in
the Away3D Stats jump wildly between 20 frames per second and 100
frames per second and the MS reading in the stats jumps from 65 all
the way up to 1800 at times and freezes the game for a second.
I have set the framerate in the game like this: [SWF(frameRate="30",
backgroundColor="#000000")]
I want the framerate to stay the same even if there are only a few
planes on screen towards the end of the street. Can someone please
tell me how to stabilize the framerate so it is the same throughout
the game?
This is driving me insane!
Thanks =)