You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to HaxeFlixel
Is there a way to do this? So anything outside of the bounds of the stage is hidden/cut off.
Emin Fedar
unread,
Aug 15, 2015, 10:34:05 AM8/15/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to HaxeFlixel
You can create grids. For example : every 1000x1000 can be grid. You can handle it like this : grids[0][0] -> 0x0 - 1000x1000 grid. If an object in this grid (you can calculate this by Math.floor(controlobject.x/1000) ) you will add it to grid[0][0] array (dynamic).
set visible value false in objects in other grids.
15 Ağustos 2015 Cumartesi 15:19:59 UTC+3 tarihinde Shaun Michael K. Stone yazdı:
SruloArt
unread,
Aug 15, 2015, 2:29:34 PM8/15/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxef...@googlegroups.com
* Checkout FlxG.worldBounds. By default stuff outside of it won't overlap-collide (quadTree). You can use FlxObject.inWorldBounds() to kill objects that are outside of it (as mentioned in the method's description).
* Also, objects outside of their camera's width/height (not the same as the worldBounds necessarily) won't be drawn (checkout .isOnScreen(), but FlxObject and FlxSprite have a different version of it).