Need Help With My Cleanup

I GOT IT!
I had already removed the second collider, but that did nothing. I realized then that the problem lies in the interval. Maybe the LerpFunc is still updating. So I put this code in the move task:

# stop rendering collider if interval is done
            if self.Mod1PosIv.isStopped():
                render.find('**/+CollisionVisualizer').node().clear()

and WOOHOO! It worked. My frame rate is once again stable. :smiley: :smiley: :smiley:

I can now get back to making progress with the game.
Thanks for all your help. I don’t think I could have done it without your input. I learned a few codes that have now become useful to me. Thanks

treeform

Were you refering to something like this:

import direct.directbase.DirectStart
from direct.gui.DirectGUI import *
...
class World(DirectObject):
    # constructor
    def __init__(self):
        base.disableMouse()
        camera.setPosHpr(Vec3(0,-15,7),Vec3(0,-15,0))

        self.loadModels()
        self.loadSounds()
    
        self.setupLighting()
    # end __init__
    
    def start(self):
        self.setupCollisions()
        
        # setup key controls
        self.accept("escape",sys.exit)
        
        self.accept("arrow_up",self.walk)
        self.accept("arrow_left",self.turn,[-1])
        self.accept("arrow_right",self.turn,[1])
        
        # setup picking
        self.picker = Picker()
        self.panda.setTag("event","hit-panda")
        self.accept("mouse1",self.pick)
        self.accept("hit-panda",self.hitPanda)
        
        # start camera task
        taskMgr.add(self.cameraFollowTask,'cameraFollowTask')
        
        # start music
        SoundInterval(self.music).loop()
    # end start

...
# end class World

def startWorld():
    clickToStart.remove()
    world.start()

world = World()
clickToStart = DirectButton(image="clicktostart.tif",command=startWorld)

run()

I had used this when I first started using Panda, but I found it was one-way. At the time I didn’t know how to reverse it.

Thanks again ALL. :smiley: