Monday, June 11, 2012

Custom Camera Controls

Today I stopped using the built in camera controller and made my own.  By default, the SimpleApp class in JME3 has a camera built in (cam) and an "appstate" that extends this camera called "flycam".  Flycam is nice for debugging and such since it comes with built in WASD controlls and mouse rotation, but for my project it needed to be replaced.  Building my own flycam replacement was important because it allows more control over how the user inputs are handled.  Now any kind of input device can, with some work, be made to work with the game.

All that is left to do on my controller is to play around with the way the camera gets moved so that it feels more like a helicopter and less like a flying super camera.  By this I mean there should be acceleration and momentum to the movement, and when not moving the camera should return to a position parallel to the ground like it was hovering.  Also, though it should be very simple now to make different perspectives (such as first person) I have not tested this out yet, so that also needs to be done.

2 comments:

  1. Please elaborate on the difference between built-in camera controller and custom camera controller. And what do you mean by moving like a helicopter instead of flying camera? The blog serves as part of your research report. So please provide more details. Thanks.

    What's the progress for deploying the game on the server via Java Web Start?

    ReplyDelete
    Replies
    1. I have updated my post for better clarity. Also, I'm going to send you an email about the web start shortly, I have a few questions =)

      Delete