lukaMis Posted November 12, 2014 Share Posted November 12, 2014 Hi I would like to ask for a small help with collision of group with sprite. How can i access witch one sprite in group collided / overlapped with second sprite in a overlap callback. code:this.physics.arcade.overlap(this.car, this.parkingGroup, this.carInParking , null, this);carInParking: function () {},So in carInParking i would like to know exactly witch one sprite from this.parkingGroup overlapped with this.car. Is that possible? tnxLuka Link to comment Share on other sites More sharing options...
spencerTL Posted November 12, 2014 Share Posted November 12, 2014 The callback has the two overlapping objects passed to it automatically. Just change your function tocarInParking: function (obj1,obj2){...}http://docs.phaser.io/Phaser.Physics.Arcade.html#overlap Link to comment Share on other sites More sharing options...
lukaMis Posted November 12, 2014 Author Share Posted November 12, 2014 @spencerTL Tnx, Just what i needed. Link to comment Share on other sites More sharing options...
Recommended Posts