Right now the player can hit the activate key; and if it detects a vehicle, the player's state will be set to Piloting, the player will forward all commands to the vehicle, and the vehicle will respond to the command queue (right now, just by rotating and moving forward).
I still have some outstanding issues:
The vehicle collides with walls properly, but when the player exits, he still is only able to collide with the vehicle in its original position - he can walk through the rendered vehicle at its new position, but can't walk through where the vehicle was originally. I'm guessing this is just due to the way I moved the vehicle; I'm about to see how CompanyBot differs from this:
Code: Select all
if (Keys & PCK_MoveForward ) WishVelocity= VectorT( VelX, VelY, 0);
m_Physics.MoveHuman(PlayerCommands[PCNr].FrameTime, m_Heading, WishVelocity, WishVelocity, WishJump, WishJump, 470.0);
I also haven't figured out yet how to determine if the player is "touching" the vehicle - ideally, I'd cast a ray or something straight out from the player's crosshairs, find whatever's under the target, and read the length of the ray. If the target is a vehicle and the distance low enough, the player would hop in. I've been looking at your CheckGUI code to try to figure out how this might be done, but I'm having trouble untangling the crosshair->gui cursor parts from the facing and rangecheck parts...
Still, I can jump in and drive around!
(I assume you refer to something like "surveillance cameras" in "camera views in world guis!" ?)
Yes, this would be nice, but it requires rendering the (surveillance) camera frame to a texture buffer, then rendering this in turn as part of a GUI desktop from the player cameras perspective. The same technique (render-to-texture) also has many other uses, and thus the plan is to implement it universally.
Surveillance camera-type stuff was my first thought; but it'd also make for awesome cockpits, be a fun addition to a seeking missile weapon (or deployed drone), squad tactics might involve seeing what other teammates see (a la Portal 2)... there's a lot of options! Glad it's on your list, though I'm in no hurry - I still have a lot of basic gameplay to implement before I reach this stage!
(Joystick input requires re-introducing DirectInput under Windows. I can't help you much with it, but it shouldn't be a big problem.)
Also a fair ways off - especially as I'm developing on Linux Do plan to do both OS's; I expect I'll be able to deal with that when I have a little bit more base gameplay...