O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - looking at task statistics

We still don't see any stats for our tasks because we are still printing the task manager before the first frame is being generated. Let's change that next.

  1. To see the statistics on our tasks we just need to move the print(taskMgr) command to a place where it will be executed after the first frame has been generated. The simplest solution to that is to move that line into our task method so that it's called every frame. Highlight that line and hit Ctrl+X to cut it. Then paste it into the cycleMove method just above the return statement.
    class World: def __init__(self): base.setBackgroundColor(0, 0, 0) self.track = loader.loadModel("../Models/Track.egg") self.track.reparentTo(render) self.track.setPos(0,0,-5) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required