Ok....so I tried this:
When I create the scene:
_timeBase = new TimeBase(_viewPort3D.scene, 30);
Then in the onEnterFrame:
private function onEnterFrame(e:Event):void
{
var speed:Number = _timeBase.timeVal(2);
_cam.moveForward(speed);
_viewPort3D.render();
}
I also tried this in the onEnterFrame:
private function onEnterFrame(e:Event):void
{
_cam.z +=_timeBase.timeVal(2);
_viewPort3D.render();
}
I entered 30 in the _timeBase.timeValue and my camera moved like the
Enterprise in Star Trek when Captian Picard says "Warp 9...Engage".
(Basically, it was moving at warp speed)
I dont think Im doing this right. Could you check it out and advise?
Thanks
On Oct 2, 3:13 pm, Fabrice3D <[email protected]> wrote:
> Good point Pete!
> Its just most of the time we get the reverse question: how to speed
> up? :))
>
> Is this swf the only swf? No other swfs loaded after this one does set
> another fps rate?
>
> Fabrice
>
> On Oct 3, 2009, at 12:02 AM, Peter Kapelyan wrote:
>
> > If you have an swf to look it it might help see what's wrong and
> > suggest something. Also, it's odd that it would jump to 100fps if
> > you say you have it locked to 30fps :O
>
> > -Pete
>
> > On Fri, Oct 2, 2009 at 5:47 PM, Crisstyle <[email protected]> wrote:
>
> > 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 =)
>
> > --
> > ___________________
>
> > Actionscript 3.0 Flash 3D Graphics Engine
>
> > HTTP://AWAY3D.COM