Jump to content

How can I make a tileSprite collide with other objects?


tommyfok
 Share

Recommended Posts

post-7175-0-12289000-1393396310.jpg

 

as you can see, when the bird is flying forward, the ground should be moving backward.

but I can't make the bird collide with the moving ground.

ground1 = game.add.tileSprite(0,wsize.y-112,wsize.x,112,'ground');ground1.body.setSize(wsize.x,112,0,0);ground1.body.immovable = true;gg = game.add.sprite(0,wsize.y-112,'ground');gg.body.setSize(wsize.x,112,0,0);gg.body.immovable = true;//ground1 cannot collide with other objects while gg can.
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...