Using FlxCameras

51 views
Skip to first unread message

Sam Bellman

unread,
Nov 6, 2015, 4:07:39 AM11/6/15
to HaxeFlixel
You just set the camera for every asset you create.
scoreText.camera = hudCamera;
inGameObject
.camera = gameCamera;
unless I'm misunderstanding what your asking or your issues.

Keith Weatherby II

unread,
Nov 7, 2015, 11:53:40 AM11/7/15
to haxef...@googlegroups.com
I could set them all to the camera I want, however there are so many I thought that setting FlxCamera.defaultCameras = [FlxG.camera] meant that when I don't set anything explicitly it will default to the main camera.  Which means in theory i could just set the hud camera items and leave the rest alone.

Was I wrong?  Was hoping for a simpler way.

Gama11

unread,
Nov 8, 2015, 5:24:37 AM11/8/15
to HaxeFlixel
Setting defaultCameras is indeed the recommended approach. Why are you asking, is it not working for you?
Reply all
Reply to author
Forward
0 new messages