mariogarranz Posted March 31, 2015 Share Posted March 31, 2015 Invisible sprites are not colliding with ARCADE physics, is this normal?Even though visible is set to false, I double checked that their body.enable is set to true, but they still won't collide. Any ideas? Link to comment Share on other sites More sharing options...
mariogarranz Posted March 31, 2015 Author Share Posted March 31, 2015 Just a note, when setting alpha = 0 collision does still work. This will do the trick for me, but I guess there's some bug in there. Link to comment Share on other sites More sharing options...
BunBunBun Posted March 31, 2015 Share Posted March 31, 2015 for me, when setting alpha = 0 collision works okay, when visible is set to false - don't work. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well. Link to comment Share on other sites More sharing options...
rich Posted March 31, 2015 Share Posted March 31, 2015 This is normal - Pixi skips all 'visible false' Sprites from the update transform, so their position never changes or propagates, where-as alpha 0 sprites are just skipped for rendering (you could equally do Sprite.renderable = false, which is a cleaner way of doing it imho). This won't be changed in any Phaser 2 release as it has been like this for years now so would be too much of a change. It's something we did address in Phaser 3 however (the issue is semantic really, i.e. the naming of things vs. expected behaviour, rather than technical). mariogarranz 1 Link to comment Share on other sites More sharing options...
mariogarranz Posted March 31, 2015 Author Share Posted March 31, 2015 OK thanks Rich, I did a quick search on the forums and found some posts that said that as long as the body was enabled it should keep working so that's why I guessed it was wrong. Link to comment Share on other sites More sharing options...
Recommended Posts