Skip to content

Any way to have cameras selectively render things? #2607

Answered by Geokureli
piboistudios asked this question in Q&A
Discussion options

You must be logged in to vote

All sprites will, by default, draw to all cameras set as a default draw target, to only have certain cameras draw a sprite you must set either it's cameras or camera (which just sets cameras = [cam]) fields.

FlxGroups have a cameras field as well, setting it will set the default cameras of any child sprite it contains. However, any child sprite of that group that has it's own cameras set will draw to those cameras instead of the group's.

Note: I wanted wrote a separate answer so that future people searching this aren't deferred to a ~11 year old stack overflow link.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Geokureli
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Geokureli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants