AS3 2.1 Port (Alchemy), WCK Update and Kinematic Demos

I might be missing something really obvious here, but I can't seem to add 2 circle shapes to a single body without them both being in the centre of the body?

How do i specify the position of the second circle in the body? Easy to do with a poly as the positions are explicitly set.

Thanks!
itr77 wrote:
How do i specify the position of the second circle in the body? Easy to do with a poly as the positions are explicitly set.


In a subclass of BodyShape:

Code:
public override function shapes():void {
       circle(30, new V2(10, 10)); /// <-- position
}


Or just create another symbol that extends shapes.Circle and place it where ever you want in your parent BodyShape.
Hello,
Really nice work, but I'm wondering how do you use it? Because I've been looking around to see some example and I can't find any. The only one is the Hello World which the code seems to be hide in a swc file (I don't know how to open it btw).
So if someone could show me somewhere I can find a piece of code on how to use it, I'll be thankful!
ah, i am starting to see how you can put stuff together, hopefully someone will start to put together some tutorials to help the beginners like me out.

Currently I am understanding how to complete my project using traditional box2d rather than the wck because of all the tutorials and information.
Silo wrote:
Hello,
Really nice work, but I'm wondering how do you use it? Because I've been looking around to see some example and I can't find any. The only one is the Hello World which the code seems to be hide in a swc file (I don't know how to open it btw).
So if someone could show me somewhere I can find a piece of code on how to use it, I'll be thankful!


To get the WCK going is really simple. The demo.fla under the demo folder shows how it's done. Simply make your shapes(boxes, circles, arcs, whatever) and export them to ActionScript and let them have a base class of the shape they represent(box, circle etc. found under the shapes folder).

Put everything inside a MovieClip that has a base class of World(wck.World) and that's it, now they're physics objects inside a physics world. Also make sure to follow these steps first: http://wiki.github.com/jesses/wck

I'm having some problems with the newest version though. I've been fooling araound with the 2010-01-02 version and everything works like a charm. But when I'm trying to use the newest version with the same project I get the following error:

Code:
VerifyError: Error #1014: Class wck::GoodbyeJointEvent could not be found.

   at global$init()
   at wck::BodyShape$cinit()
   at global$init()
   at global$init()

Followed by a bunch of null object reference errors. Any suggestions why this is happening?
Rockerolf wrote:
Any suggestions why this is happening?


Yeah, those files are not in the latest release. I noticed that the last download I had was missing those files. If you have them from an older build just add them to the wck folder. Otherwise you'll have to wait for them to go back up (and just checked: they're not).

BTW: WCK goes near the top in my list of "Best things ever"; it just passed "sliced bread" and is nearing "robotic ninjas" territory of awesomeness. 😀
I moved GoodbyeJointEvent (as well as a bunch of other event stuff) into the core Alchemy port (the Box2DAS/Dynamics folder):

http://github.com/jesses/wck/tree/maste ... /Dynamics/

So as long as you "import Box2DAS.Dynamics.*" you shouldn't get that error. Let me know if that is not the case.

I've been debating with myself what should be part of the low level Alchemy port VS. the high level WCK component framework. Native AS3 events seems universally useful enough to include in the core port. Especially since you can forgo using them by defining your own listeners anyway, and they only trigger if userData is an EventDispatcher.
Latest build gives these errors for me
Code:
1152: A conflict exists with inherited definition Box2DAS.Dynamics:b2World.stepTime in namespace public.
1020: Method marked override must override another method.
are those egg shapes polygons or a new feature for arcs?
sketchbookgames wrote:
are those egg shapes polygons or a new feature for arcs?


They are polygons. There are some utility methods in WCK to automatically chop an arc into polygons based on its size.

Original thread: https://box2d.org/forum/viewtopic.php?t=4105