User Tag List

Results 1 to 5 of 5

Thread: Assigning object ID's in Box2D

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Assigning object ID's in Box2D

    Does anyone know a way of quickly knowing the box 2 id's of each object created for reference. I am trying to get the alterable value of an object to correspond to the velocity of a box2d box but there doesn't seem to be an easy way to know the id's of any object created through box2d...

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Assigning object ID's in Box2D

    If you attached an object to a body, you can use the expression to convert the fixed value of an active to a body ID.
    BodyFixedID( "Phizix - Box2D", >Fixed Value of Object<)
    or
    BodyFixedID( "Phizix - Box2D v2.0.0", >Fixed Value<)
    Depending on which version of Box2D you're using - the names are the same, though, and so is the usage, so it shouldn't matter.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Assigning object ID's in Box2D

    How do you attach a body to an object exactly?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Assigning object ID's in Box2D

    What? How have you been making the objects move relative to the bodies, then?

    To attach an active to a body:
    For Regular Box2D: Attached Objects -> Attach Object to Body
    For Box2D v2.0.0: Attachments -> Attach Object to Body
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Assigning object ID's in Box2D

    I've used the following: Start of frame ; (quick create body at object (Active), offset (0,0) Body type (2) Rotation (2) Killflag (1))

    and (Set alterable value A of (Active) to LastbodyID (Box2D))

    So when I have multiple actives they each have their own body created at their centre point. this works fine but now I want to set know the angular or linear velocity of an object and set it to the corresponding actives alterable value B.

Similar Threads

  1. Destroy object on collision - Box2d
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 4th October 2012, 11:13 AM
  2. Box2d object
    By ColdFire in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th August 2011, 01:23 PM
  3. Help with assigning icons with power system object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 14th September 2010, 02:58 PM
  4. Assigning target folders
    By mwiebe in forum Install Creator and Patch Maker
    Replies: 3
    Last Post: 3rd March 2009, 07:35 PM
  5. Assigning active object multiple movement paths
    By Kinjir0 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th October 2008, 02:40 AM

Posting Permissions

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