|
Here is the actual forwardOnY: method.
forwardOnY: foy
| wall dist v |
(foy < 0) ifTrue: [
wall := forwardPointer selectedFrame.
dist := forwardPointer selectedDistance.
"forwardPointer resetSelected."
] ifFalse: [
wall := backPointer selectedFrame.
dist := backPointer selectedDistance.
"backPointer resetSelected."
].
"pos := forwardPointer selectedFramePosition."
"gotoCount ~= 0 ifTrue:[ ^ self doGoto]."
( ( (wall isNil) or: [wall isMazeWall not] ) or: [dist > 1.0] ) ifTrue: [
v := localTransform lookSide.
v := (v cross:(0@1@0))*foy.
localTransform translation: (self root checkMotion: v forAvatar:self ).
cameraPitch abs > 0.001 ifTrue:[ cameraPitch := cameraPitch * 0.8].
self roll abs > 0.001 ifTrue:[self roll: self roll * 0.8].
].
|