Toon Collisions *PLEASE HELP*

So i’m basically just setting up a landwalker at this point, and i have the toon loaded and moving, it’s just the problem of i can’t get the collisions to work. Here is all of the code i have:

from direct.actor.Actor import Actor
from direct.showbase.DirectObject import DirectObject
from direct.interval.IntervalGlobal import *
from direct.showbase.InputStateGlobal import inputState
from pandac.PandaModules import *

class Toon(Actor, DirectObject):

    def __init__(self, taskMgr):
        self.taskMgr = taskMgr
        self.body = None

    def loadActor(self):
        legs = Actor("phase_3/models/char/tt_a_chr_dgl_shorts_legs_1000")
        legs.find('**/shoes').removeNode()
        legs.find('**/boots_short').removeNode()
        legs.find('**/boots_long').removeNode()
        torso = Actor("phase_3/models/char/tt_a_chr_dgl_shorts_torso_1000")
        head = Actor("phase_3/models/char/tt_a_chr_dgl_shorts_head_1000")
        self.body = Actor({'legs': legs, 'torso': torso, 'head': head},
                          {'legs': {"neutral": "phase_3/models/char/tt_a_chr_dgl_shorts_legs_neutral",
                                    "run": "phase_3/models/char/tt_a_chr_dgl_shorts_legs_run",
                                    'walk': "phase_3.5/models/char/tt_a_chr_dgl_shorts_legs_walk",
                                    'jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_legs_jump-zhang',
                                    'running-jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_legs_leap_zhang'},
                           'torso': {"neutral": "phase_3/models/char/tt_a_chr_dgl_shorts_torso_neutral",
                                     "run": "phase_3/models/char/tt_a_chr_dgl_shorts_torso_run",
                                     'walk': "phase_3.5/models/char/tt_a_chr_dgl_shorts_torso_walk",
                                     'jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_torso_jump-zhang',
                                    'running-jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_torso_leap_zhang'},
                           'head': {"neutral": "phase_3/models/char/tt_a_chr_dgl_shorts_head_neutral",
                                    "run": "phase_3/models/char/tt_a_chr_dgl_shorts_head_run",
                                    'jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_head_jump-zhang',
                                    'running-jump-idle': 'phase_3.5/models/char/tt_a_chr_dgl_shorts_head_leap_zhang'}})
        self.body.attach('torso', 'legs', 'joint_hips')
        self.body.attach('head', 'torso', 'def_head')
        self.setupCollisions()
        return self.body

    def setupCollisions(self):
        geom = self.body.getGeomNode()
        geom.getChild(0).setSx(0.730000019073)
        geom.getChild(0).setSz(0.730000019073)
        self.offset = 3.2375
        self.cTrav = CollisionTraverser()
        from direct.controls.GravityWalker import GravityWalker
        walkControls = GravityWalker(legacyLifter=True)
        walkControls.setWallBitMask(BitMask32(1))
        walkControls.setFloorBitMask(BitMask32(2))
        walkControls.setWalkSpeed(40.0, 30.0, 30.0, 30.0)
        walkControls.initializeCollisions(self.cTrav, self.body, floorOffset=0.025, reach=4.0)
        walkControls.setAirborneHeightFunc(self.getAirborneHeight)
        walkControls.enableAvatarControls()
        self.body.physControls = walkControls
        self.keyMap = {'left': 0, 'right': 0, 'forward': 0, 'backward': 0, 'control': 0}
        self.setWatchKey('arrow_up', 'forward', 'forward')
        self.setWatchKey('control-arrow_up', 'forward', 'forward')
        self.setWatchKey('alt-arrow_up', 'forward', 'forward')
        self.setWatchKey('shift-arrow_up', 'forward', 'forward')
        self.setWatchKey('arrow_down', 'reverse', 'backward')
        self.setWatchKey('control-arrow_down', 'reverse', 'backward')
        self.setWatchKey('alt-arrow_down', 'reverse', 'backward')
        self.setWatchKey('shift-arrow_down', 'reverse', 'backward')
        self.setWatchKey('arrow_left', 'turnLeft', 'left')
        self.setWatchKey('control-arrow_left', 'turnLeft', 'left')
        self.setWatchKey('alt-arrow_left', 'turnLeft', 'left')
        self.setWatchKey('shift-arrow_left', 'turnLeft', 'left')
        self.setWatchKey('arrow_right', 'turnRight', 'right')
        self.setWatchKey('control-arrow_right', 'turnRight', 'right')
        self.setWatchKey('alt-arrow_right', 'turnRight', 'right')
        self.setWatchKey('shift-arrow_right', 'turnRight', 'right')
        self.setWatchKey('control', 'jump', 'control')
        self.movingNeutral, self.movingForward = (False, False)
        self.movingRotation, self.movingBackward = (False, False)
        self.movingJumping = False
        self.taskMgr.add(self.handleMovement, 'controlManager')
        self.accept('f1', self.toggleCollisions)
        self.body.collisionsOn = self.collisionsOn
        self.body.collisionsOff = self.collisionsOff
        self.body.toggleCollisions = self.toggleCollisions
        localAvatar = self.body
        self.localAvatar = localAvatar
        localAvatar.physControls.placeOnFloor()

    def getAirborneHeight(self):
        return self.offset + 0.025000000000000001

    def setWatchKey(self, key, input, keyMapName):
        def watchKey(active=True):
            if active == True:
                inputState.set(input, True)
                self.keyMap[keyMapName] = 1
            else:
                inputState.set(input, False)
                self.keyMap[keyMapName] = 0

        self.accept(key, watchKey, [True])
        self.accept(key + '-up', watchKey, [False])

    def setMovementAnimation(self, loopName, playRate=1.0):
        if 'jump' in loopName:
            self.movingJumping = True
            self.movingForward = False
            self.movingNeutral = False
            self.movingRotation = False
            self.movingBackward = False
        elif loopName == 'run':
            self.movingJumping = False
            self.movingForward = True
            self.movingNeutral = False
            self.movingRotation = False
            self.movingBackward = False
        elif loopName == 'walk':
            self.movingJumping = False
            self.movingForward = False
            self.movingNeutral = False
            if playRate == -1.0:
                self.movingBackward = True
                self.movingRotation = False
            else:
                self.movingBackward = False
                self.movingRotation = True
        elif loopName == 'neutral':
            self.movingJumping = False
            self.movingForward = False
            self.movingNeutral = True
            self.movingRotation = False
            self.movingBackward = False
        else:
            self.movingJumping = False
            self.movingForward = False
            self.movingNeutral = False
            self.movingRotation = False
            self.movingBackward = False
        ActorInterval(self.body, loopName, playRate=playRate).loop()


    def handleMovement(self, task):
        if self.keyMap['control'] == 1:
            if self.keyMap['forward'] or self.keyMap['backward'] or self.keyMap['left'] or self.keyMap['right']:
                if self.movingJumping == False:
                    if self.body.physControls.isAirborne:
                        self.setMovementAnimation('running-jump-idle')
                    else:
                        if self.keyMap['forward']:
                            if self.movingForward == False:
                                self.setMovementAnimation('run')
                        elif self.keyMap['backward']:
                            if self.movingBackward == False:
                                self.setMovementAnimation('walk', playRate=-1.0)
                        elif self.keyMap['left'] or self.keyMap['right']:
                            if self.movingRotation == False:
                                self.setMovementAnimation('walk')
                else:
                    if not self.body.physControls.isAirborne:
                        if self.keyMap['forward']:
                            if self.movingForward == False:
                                self.setMovementAnimation('run')
                        elif self.keyMap['backward']:
                            if self.movingBackward == False:
                                self.setMovementAnimation('walk', playRate=-1.0)
                        elif self.keyMap['left'] or self.keyMap['right']:
                            if self.movingRotation == False:
                                self.setMovementAnimation('walk')
            else:
                if self.movingJumping == False:
                    if self.body.physControls.isAirborne:
                        self.setMovementAnimation('jump-idle')
                    else:
                        if self.movingNeutral == False:
                            self.setMovementAnimation('neutral')
                else:
                    if not self.body.physControls.isAirborne:
                        if self.movingNeutral == False:
                            self.setMovementAnimation('neutral')
        elif self.keyMap['forward'] == 1:
            if self.movingForward == False:
                if not self.body.physControls.isAirborne:
                    self.setMovementAnimation('run')
        elif self.keyMap['backward'] == 1:
            if self.movingBackward == False:
                if not self.body.physControls.isAirborne:
                    self.setMovementAnimation('walk', playRate=-1.0)
        elif self.keyMap['left'] or self.keyMap['right']:
            if self.movingRotation == False:
                if not self.body.physControls.isAirborne:
                    self.setMovementAnimation('walk')
        else:
            if not self.body.physControls.isAirborne:
                if self.movingNeutral == False:
                    self.setMovementAnimation('neutral')
        return task.cont

    def collisionsOn(self):
        self.body.physControls.setCollisionsActive(True)
        self.body.physControls.isAirborne = True

    def collisionsOff(self):
        self.body.physControls.setCollisionsActive(False)
        self.body.physControls.isAirborne = True

    def toggleCollisions(self):
        if self.body.physControls.getCollisionsActive():
            self.body.physControls.setCollisionsActive(False)
            self.body.physControls.isAirborne = True
        else:
            self.body.physControls.setCollisionsActive(True)
            self.body.physControls.isAirborne = True

This is my “Toon” class, and i have one other file that loads up the ShowBase and reparents everything.

Does your model have collisions built in?