Heppell08 Posted January 20, 2014 Share Posted January 20, 2014 Is my usage of this wrong? I've put it in create, it renders, put it in update, it renders. I have no clue now. Just want the platforms to not render but be updated for colliding. I originally scaled them down to 0.001 so there were "technically" invisible. Heres what i'm doing:// in createplatforms = game.add.group(); var ground = platforms.create(0, game.world.height - 64, 'ground'); ground.body.immovable = true; ground.scale.x = game.world.width; ground.renderable = false;Also tried platforms.renderable = false; too. Link to comment Share on other sites More sharing options...
Tjkoopa Posted January 20, 2014 Share Posted January 20, 2014 Try setting visible to false; not sure on the mechanics/uses for renderable, but I think it might be only used internally for culling. Setting visible false might disable transforms though so if you need the invisible platforms to move or change size you might need to set alpha to 0 instead. Link to comment Share on other sites More sharing options...
Heppell08 Posted January 20, 2014 Author Share Posted January 20, 2014 ive done the visible false but it is classed as non-updateable so player falls through it. Its easy having the scale set to super low but its impacting on memory i may need at a later stage in development and if i need more invisible stuff and i keep setting the scales to super low its going to preload forever and probably lag hard too. I dunno where this renderable code goes. i've put it in places i assume would be correct. its been in: Preload // says undefined Create // does nothing - no errors in Chrome F12 Console Update // does nothing - no errors in Chrome F12 Console Totally stumped because i seen Rich say its in the loop, ive put it there and still rendering as standard... Link to comment Share on other sites More sharing options...
Tjkoopa Posted January 20, 2014 Share Posted January 20, 2014 Did you try setting alpha to 0? Link to comment Share on other sites More sharing options...
Heppell08 Posted January 20, 2014 Author Share Posted January 20, 2014 i know the issue now. If i run the game in firefox it isnt rendered, in chrome it is rendered. Its a browser issue with chrome. Not sure if Rich knows but when he reads this he will. Link to comment Share on other sites More sharing options...
XekeDeath Posted January 20, 2014 Share Posted January 20, 2014 If you don't want the sprite to ever be rendered, make it an invisible sprite by not including an image key. var ground = platforms.create(0, game.world.height - 64); Heppell08 1 Link to comment Share on other sites More sharing options...
Heppell08 Posted January 20, 2014 Author Share Posted January 20, 2014 Well now there's an idea! I didn't test that as I assumed that would give errors. I'll be testing that tomorrow! Thanks XekeDeath Link to comment Share on other sites More sharing options...
Recommended Posts