kidos Posted July 7, 2014 Share Posted July 7, 2014 I wondered if I could enable collideWorldBounds = true only for bottom, left and right parts of the world bounds (and keep the "up" part to false)? Thanks! Link to comment Share on other sites More sharing options...
lewster32 Posted July 8, 2014 Share Posted July 8, 2014 Just create three off-screen immovable sprites as invisible walls the width/height of the world to form a U shape. Link to comment Share on other sites More sharing options...
kidos Posted July 8, 2014 Author Share Posted July 8, 2014 Just create three off-screen immovable sprites as invisible walls the width/height of the world to form a U shape. You sneaky bastard Thanks!! I'll try that... lewster32 1 Link to comment Share on other sites More sharing options...
lewster32 Posted July 8, 2014 Share Posted July 8, 2014 Ha! Sneaky! I like it! Link to comment Share on other sites More sharing options...
lewster32 Posted July 8, 2014 Share Posted July 8, 2014 If you want a better performing solution that takes a little more work, you could add your own version of the checkWorldBounds method by extending the Sprite object and applying it in the constructor too. That's sneakier. Link to comment Share on other sites More sharing options...
kidos Posted July 8, 2014 Author Share Posted July 8, 2014 If you want a better performing solution that takes a little more work, you could add your own version of the checkWorldBounds method by extending the Sprite object and applying it in the constructor too. That's sneakier. that's even less work and much easier. ohh, and work perfectly thanks again! lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts