Any way to have cameras selectively render things? #2607
-
I have a turn based game running on a server that then records GIFs of the battle and sends replays to chatrooms (like Slack, Discord, etc..) I can add multiple cameras with FlxG to render/record multiple battle scenes concurrently, but is it possible to utilize the exact same battle scene, but show different characters/monsters/fx for different cameras? e.g. Only show certain FlxGroups to certain cameras |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Nevermind, see: https://stackoverflow.com/a/8176178/1538301 |
Beta Was this translation helpful? Give feedback.
-
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
Note: I wanted wrote a separate answer so that future people searching this aren't deferred to a ~11 year old stack overflow link. |
Beta Was this translation helpful? Give feedback.
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
orcamera
(which just setscameras = [cam]
) fields.FlxGroups
have acameras
field as well, setting it will set the defaultcameras
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.