Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using flixel v2.5 and am using to get the camera to follow the player. I have a background FlxSprite that I don't want to move with the camera. Is there a way I can set this FlxSprite to stay in the same place on the screen? I would also like to have a GUI HUD that stays fixed to the screen, and was thinking I could do this the same way.

share|improve this question
up vote 2 down vote accepted

In previous versions, you could set the background/HUD's scrollfactor.x and scrollfactor.y to zero. Does that still work in 2.5?

share|improve this answer
Yip, scrollfactor still works. I found that I had to set the scrollfactors on some objects in a nested group to get the effect that I needed. thanks. – Adam Harte Apr 25 '11 at 1:34
When you add an object to a group, there should be an optional second parameter that makes its scrollfactor match the group's. – Gregory Avery-Weir Apr 25 '11 at 13:02
Thanks for the tip. That is great. – Adam Harte Apr 25 '11 at 21:25

Your Answer


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.