I'm attempting to implement a camera and movement control scheme similar to WoW or EQ2. For those who don't know how those work, I'll try to summarize what I want:
- 3rd person camera, always facing player. Player walks along terrain, staying effectively "glued" to it.
- W/A move forward/back, relative to the direciton the player is facing.
- When moving forward/back with keyboard, A/D turn the player, thus walking in a curve. Camera stays directly behind player.
- When moving forward by holding the right mouse button (see below), A/D strafe left and right, without changing the direction the player is facing. The camera should strafe with the player, to maintain the same angle of view.
- When not moving at all, A/D simply turn the player without walking.
- Moving the mouse without any buttons pressed moves around moves a cursor, and has no effect on the player or camera positions/direction.
- Holding the left mouse button and moving the mouse around at any time moves the camera, keeping it facing the player, but rotating around the player.
- Holding down the right mouse button makes the player walk forward, whichever direction the camera is facing. (ie. If the player is not facing the direction of the camera, immediately rotate them that direction.) Turning the mouse turns the player.
Or something to that effect. I’m sure I can work out the details once I can get something close.
Anyway, I’ve been playing with ChaseCamera and ThirdPartyHandler, as well as RenControlEditor, and I’ve noticed some really weird behavior while trying to get something close to the behavior I want.
If you launch RenControl Editor, and change only this settings:
Movement tab, Movement Alignment, Target Aligned.
Then things start behaving very oddly.
A, which should turn left, seems to walk forward, turning very very slightly to the left.
D, which should turn left, also does the same as A.
S, which should go straight back, weaves a bunch randomly.
Q and E which should strafe left and right respectively, do the opposite.
If you disable Gradual Turns on the same tab, it’s even weirder.
D then seems to walk forward even faster than W, and A just makes the cube sit there and vibrate, but does seem to somehow affect the direction it’s facing.
If you put Movement Alignment back to Camera Aligned, but leave Gradual Turns disabled, then A and D make the camera rotate, instead of making the cube rotate, which is rather odd, because it makes the effect of the movement different depending how far zoomed out you are. ie, if you’re zoomed way out, A/D make it look like you’re strafing, but if you’re zoomed way in, then it looks like it’s running in tiny little circles.
Am I completely out to lunch on how ThirdPersonHandler is supposed to work, or is something here really buggy?
(For what it’s worth, I’m using StandardGame and GameStates. If anyone wants to poke around, I’m happy to zip up the eclipse project and send it over.)
In searching around, I also found this post:
Which describes the same problem nearly a year ago, without any response.