Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Drawing Custom Shapes


ninemind
 Share

Recommended Posts

If I have an array of x,y points, how can I draw a shape on the canvas that passes through those points either as straight lines or curves and also use it as a collision shape. These shapes may not always be solid.  For example I might draw a shape that looks like the letter "A" where there is a triangle hole in the shape who's borders will have collision.

Link to comment
Share on other sites

I think I figured out how to create complex collision shapes with p2.js using p2.Convex() but I'm having trouble displaying the shape on the Panda.js canvas with DebugDraw.  I am using the Panda.js files from the development branch as well as p2.js from your plugins on github but I see nothing being displayed. Even with simple p2.Circle's or p2.Rectangle's I see nothing.

Link to comment
Share on other sites

  • 3 months later...
 Share

  • Recently Browsing   0 members

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