User Tag List

Results 1 to 3 of 3

Thread: Box 2D help - Shapes

  1. #1
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Box 2D help - Shapes

    Hello

    Adding a shape to a body is quite easy if it's a box or a circle. But how would i go and add a custom shape? I looked at the "testbed" example and some shapes have vertices "CSV String" of "10, 10, 10, 10, 10,..." how do i figure that out and how could i double check it? When i try to activate debug draw shapes, Fusion crashes.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Each number in the CSV string is the co-ordinates of a point (vertices) of a polygon shape. Think of those join the dots pictures, once completed they end up as a sealed shape. The co-ordinates of these points are based on your image or sprite. So to retrieve each point, open your image and move around the mouse to each point in your shape, write it down and use those in the CSV string. Each point needs an X and Y co-ordinate.

    The points need to be created in a certain order however, I think it's clockwise and you can't have any concave polygons (if you cant fit the entire shape into the one polygon set, just create another one and attach it to the same body).

    Your CSV string example wouldn't work

  3. #3
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!

    Your CSV string example wouldn't work
    Haha, yeah i know. I just wrote that for the sake of understanding, what i'm talking about.

    Any idea why it crashes when i try to let box2d draw shapes?

Similar Threads

  1. Draw elastic link between two shapes
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th January 2013, 01:47 PM
  2. My Shapes
    By Francois in forum Released Games & Apps in Flash
    Replies: 0
    Last Post: 21st March 2012, 05:33 PM
  3. My Word Shapes Application
    By Keli in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th January 2011, 08:58 PM
  4. FREE SHAPES PSD
    By imothep85 in forum File Archive
    Replies: 2
    Last Post: 3rd April 2008, 10:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •