Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a weird situation. I have a model set to 0 for X,Y and Z. My camera's position is set to:

  • 0 (X-value, but updates when the model moves around)
  • the model's height + 20f (about the same level as the model's shoulders)
  • 25f (behind the model)

Without the controller plugged in, everything looks fine as I want it. But as soon as I plug the controller in, the camera aims to the sky! But when I unplug the controller, the camera is back to what it should be.

Does anyone have any insight as to what may cause this from plugging a controller in?

share|improve this question
    
You're going to have to show us some of your code. –  Austin Brunkhorst Oct 1 '12 at 0:35

1 Answer 1

up vote 1 down vote accepted

Based upon your observation that the camera changes when you plug in a controller, your program apparently has some code which notices that a controller is connected, and changes the camera behaviour in that situation.

If you remove or disable that code, then connecting a controller should stop causing problems.

Hope this helps.

share|improve this answer
    
It was in my controller class. I had a value set 200f still. After setting it to 20f, the camera went back to normal again with the controller plugged in. –  ChocoMan Oct 1 '12 at 1:19
    
I think answers like this are like when you're playing "Guess Who" and you guess right on the first guess. –  Byte56 Oct 1 '12 at 2:35
    
@Byte56 You're just jealous of my amazing psychic powers of debugging-code-without-having-access-to-the-code. xD –  Trevor Powell Oct 1 '12 at 3:07
    
@TrevorPowell Exactly. –  Byte56 Oct 1 '12 at 3:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.