Physics: further box2d functionality

0 favourites
  • 5 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Hey all,

    I am currently working to expose more of box2d's features to construct 2. I started with expanding the body types to include kinematic bodies and it is working.

    However I have one problem. I can't seem to be able to read the new properties from the edit time or something like that. When I run the game and go into debug mode it says my property is "undefined". Any help or suggestions would be appreciated.

    Also, if anyone is interested in this extended box2d functionality, let me know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes. Even when i'm not even sure what those are but it's always good to have more options.

    Also if it's not too much trouble, could you check if it's possible to add create joint from position. When currently it is only possible from origin and image point.

  • I've played with hacking on physics plugin. I found it useful to create joints between objects with picking by uid (if i'm right you can currently pick an object only in editor). it was simple but very useful edit, maybe you could implement something like that in your plugin.

    Regarding edittime properties, please give more detail, not sure what's going on...

  • JohnnySheffield - thats a good idea. As for details:

    I basically have a new property declared in edittime.js I added it to the list of properties at the end. In Runtime I declare that this.myproperty = property_list[number of property in the list].

    The problem is that my property is never set. I Essentially mirrored other code I saw, and changed appropriate values (such as the property in the list. If I hard code this.myproperty = x then it works. This is both my first time working in java and working on construct so it may take me a bit to get up to speed. I am sure I am missing something about what type I set the object and so on (my language knowledge is C++,VB,C#,Pascal)

    Katala - To my knowledge, you can't create a joint to an arbitrary vector. Box2d requires joints to be connected to two different bodies (box2d bodies, that is) so no matter how you put the joints together you will need a second body. I think I might know why you want to be able to hinge something without another body... it would be very useful...

  • I mean the object that creates the joint. Since I cannot change origin point or create/edit imagepoints at runtime. One way to achieve this would allow to use position where to create the joint instead.

    Actually for my purposes I noticed that I can change the origin point of Yann's Polygon plugin. This seems to be good enough when I was thinking to make custom collision polygons with that anyway.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)