Box2D Forums

It is currently Sat May 25, 2013 6:24 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jun 14, 2012 12:21 am 
Offline

Joined: Thu Feb 23, 2012 4:22 am
Posts: 8
Hi,

I tried to recreate the vehicle track from the demo with no success. I made a smaller shape(Vehicle track on the demo so big), convert it to movieclip, edit the component definition to wck.BodyShape. Put it inside a world, but dynamic objects just pass through it.

Am I missing something here?


BTW I have my first physics game that is up on bidding @ FGL.

Game link: http://www.flashgamelicense.com/view_ga ... e_id=24212

Thanks,


Top
 Profile  
 
PostPosted: Thu Jun 14, 2012 10:51 am 
Offline

Joined: Thu Mar 01, 2012 9:31 am
Posts: 153
Did you notice that you also have to add the track coordinates? In the demo, those are added inside each track shape on a keyframe (e.g. VehicleTrack 2: shape(polys,
[[[2647.5, -1762.5], [3307.5, -1982.5], [2842.5, -1117.5], [1382.5, -692.5], [2142.5, -1397.5]], [[-242.5, -1722.5], [237.5, ... )

You can enter the coordinates manually or use the scripts at:
https://github.com/jesses/wck/wiki/Jsfl ... omposition
https://github.com/jesses/wck/tree/master/script


Top
 Profile  
 
PostPosted: Thu Jun 14, 2012 2:33 pm 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
Yeah, once you've got your basic track shape outline (just the outline, no graphical embelishment) run the polygon decomposition script, then the coordinates will be in the output panel. Copy that and pass to shape(polys, **coords**)


Top
 Profile  
 
PostPosted: Sat Jun 16, 2012 12:06 am 
Offline

Joined: Thu Feb 23, 2012 4:22 am
Posts: 8
Right, thanks I did it. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group