~fireclawthefox/panda3dcodecollection/trunk

« back to all changes in this revision

Viewing changes to character/extended Char controller/controlPlugins/plug03WallCollisionAvoidance.py

  • Committer: Fireclaw the Fox
  • Date: 2017-02-08 14:26:21 UTC
  • Revision ID: fireclawthefox@gmail.com-20170208142621-ljorcvore5ivwutx
Added gamepad support

- Panda3D's integrated gamepad support (preview, needs panda3d binaries build from input-overhaul branch)
- Added pyglet gamepad sample
- enhanced graphics for the extended Char controller demo

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
            coldist = colvec.length()
41
41
            doStateCheck = True
42
42
            if self.first_pserson_mode \
43
 
            and (self.isDown(self.key_backward)\
44
 
            or self.isDown(self.key_left) \
45
 
            or self.isDown(self.key_right)):
 
43
            and (self.do_move_backward\
 
44
            or self.do_move_left \
 
45
            or self.do_move_right):
46
46
              doStateCheck = False
47
47
            elif coldist <= self.forward_stop_distance:
48
48
                # we have a wall in front of us, hence we can't move forward