Jump to content

Change collision detection method.


Recommended Posts

Hi All,


I am currently experimenting with your game Flying Dog and had some issues with it.


1: Is  it possible to change the image of the barrier in the game with the one attached with this post and change the way the collision is detected so as to ignore the transparent area in the image rather than finish the game as soon as the flying dog collides with the image? 


2: Is it possible to change the background color of the game with an image.



Thanks in advance



Link to comment
Share on other sites

1. If you want to use complex shapes like shape attached in post above you have to use p2.js physics engine instead of physics engine which is part of Panda framework. Panda physics supports only bodies with basic shapes like rectangle and circle. And also only basic body collisions. 


Here is thread about p2.js physics plugin for panda



and doucmentation for p2.js



2. Yes, you can add image background as Sprite or TillingSprite and extend it with parallax effect if you want. But if you have only one colour background is better set scene property backgroundColor to some colour.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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