mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
ship slide left/right
This commit is contained in:
parent
b3d54ed848
commit
66c1e93888
@ -115,6 +115,37 @@ class ControlManager:
|
|||||||
inputState.watch("turnRight", "shift-e", "e-up")
|
inputState.watch("turnRight", "shift-e", "e-up")
|
||||||
|
|
||||||
|
|
||||||
|
# Ship turns and slides are reversed from avatar walking
|
||||||
|
inputState.watch("shipSlideLeft", "q", "q-up")
|
||||||
|
inputState.watch("shipSlideLeft", "control-q", "q-up")
|
||||||
|
inputState.watch("shipSlideLeft", "shift-control-q", "q-up")
|
||||||
|
inputState.watch("shipSlideLeft", "alt-q", "alt-q-up")
|
||||||
|
inputState.watch("shipSlideLeft", "control-alt-q", "alt-q-up")
|
||||||
|
inputState.watch("shipSlideLeft", "shift-q", "q-up")
|
||||||
|
|
||||||
|
inputState.watch("shipSlideRight", "e", "e-up")
|
||||||
|
inputState.watch("shipSlideRight", "control-e", "e-up")
|
||||||
|
inputState.watch("shipSlideRight", "shift-control-e", "e-up")
|
||||||
|
inputState.watch("shipSlideRight", "alt-e", "e-up")
|
||||||
|
inputState.watch("shipSlideRight", "control-alt-e", "e-up")
|
||||||
|
inputState.watch("shipSlideRight", "shift-e", "e-up")
|
||||||
|
|
||||||
|
# Ship turns and slides are reversed from avatar walking
|
||||||
|
inputState.watch("shipTurnLeft", "a", "a-up")
|
||||||
|
inputState.watch("shipTurnLeft", "control-a", "a-up")
|
||||||
|
inputState.watch("shipTurnLeft", "shift-control-a", "a-up")
|
||||||
|
inputState.watch("shipTurnLeft", "alt-a", "alt-a-up")
|
||||||
|
inputState.watch("shipTurnLeft", "control-alt-a", "alt-a-up")
|
||||||
|
inputState.watch("shipTurnLeft", "shift-a", "a-up")
|
||||||
|
|
||||||
|
inputState.watch("shipTurnRight", "d", "d-up")
|
||||||
|
inputState.watch("shipTurnRight", "control-d", "d-up")
|
||||||
|
inputState.watch("shipTurnRight", "shift-control-d", "d-up")
|
||||||
|
inputState.watch("shipTurnRight", "alt-d", "d-up")
|
||||||
|
inputState.watch("shipTurnRight", "control-alt-d", "d-up")
|
||||||
|
inputState.watch("shipTurnRight", "shift-d", "d-up")
|
||||||
|
|
||||||
|
|
||||||
# Jump controls
|
# Jump controls
|
||||||
if self.wantWASD:
|
if self.wantWASD:
|
||||||
inputState.watch("jump", "space", "space-up")
|
inputState.watch("jump", "space", "space-up")
|
||||||
|
@ -608,11 +608,11 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
|
|||||||
# get the button states:
|
# get the button states:
|
||||||
forward = inputState.isSet("forward")
|
forward = inputState.isSet("forward")
|
||||||
reverse = inputState.isSet("reverse")
|
reverse = inputState.isSet("reverse")
|
||||||
turnLeft = inputState.isSet("turnLeft")
|
turnLeft = inputState.isSet("shipTurnLeft")
|
||||||
turnRight = inputState.isSet("turnRight")
|
turnRight = inputState.isSet("shipTurnRight")
|
||||||
slide = 0#inputState.isSet("slide")
|
slide = inputState.isSet("slide")
|
||||||
slideLeft = 0#inputState.isSet("slideLeft")
|
slideLeft = inputState.isSet("shipSlideLeft")
|
||||||
slideRight = 0#inputState.isSet("slideRight")
|
slideRight = inputState.isSet("shipSlideRight")
|
||||||
jump = inputState.isSet("jump")
|
jump = inputState.isSet("jump")
|
||||||
# Determine what the speeds are based on the buttons:
|
# Determine what the speeds are based on the buttons:
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
|
|||||||
#self.__slideSpeed=slide and (
|
#self.__slideSpeed=slide and (
|
||||||
# (turnLeft and -avatarSlideSpeed) or
|
# (turnLeft and -avatarSlideSpeed) or
|
||||||
# (turnRight and avatarSlideSpeed))
|
# (turnRight and avatarSlideSpeed))
|
||||||
self.__slideSpeed=(
|
self.__slideSpeed=(forward or reverse) and (
|
||||||
(slideLeft and -avatarSlideSpeed) or
|
(slideLeft and -avatarSlideSpeed) or
|
||||||
(slideRight and avatarSlideSpeed))
|
(slideRight and avatarSlideSpeed))
|
||||||
self.__rotationSpeed=not slide and (
|
self.__rotationSpeed=not slide and (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user