Tuesday, June 12, 2012

Changes and Problems

Today I spent the majority of my time trying to get the camera to control like I wanted it to.  There seems to be something I am missing, as any changes I do on the main update method do not get reflected in game.  So I can position the camera where I want it initially, but on the update method if I try and move the camera nothing happens, and I use the same method to do both of these so something funny is happening that I need to figure out.  I am also experimenting with attaching the camera to a node and moving the node around, I will be sure to post the solution to this problem when I figure it out!

I also learned about AppStates today, which is a JME3 built in way of changing different "states" of game play very quickly.  For example, if you change from first person to third person, those could be two different AppStates.  AppStates can also change entire scenery, so you could potentially use AppStates to define different levels.  What is nice about AppStates is that they give access to all the Main class's SimpleApp objects, such as the root node, assetmanager, soundmanager, etc.  AppStates also hook into the update method and other very useful methods, so updating these AppStates is very easy to do.  So I am somewhat torn between carrying on with what I have, which is passing in pointers of the required objects to the classes I make, or if I should convert them to AppStates.

2 comments:

  1. I found it difficult to help you when I can't access your code. So I created a repository on github https://github.com/qarnac/windexplorer3d with empty content. Please create an account on github so that I can add you as a contributor to submit your code. This will allow me to see what you're struggling with and give more relevant suggestions.

    My hunch is that the "update" method may not be called when you think it's being called.

    ReplyDelete
  2. I have created an account: rmoe88. Let me know when I'm a contributor and I'll put everything up there.

    ReplyDelete