Box2D Forums

It is currently Thu May 23, 2013 7:59 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Nov 16, 2011 5:41 pm 
Offline

Joined: Thu Jul 23, 2009 2:15 pm
Posts: 7
Hey all,

I'm working on a sidescrolling vehicle game. I'm making my terrain out of polygons with SetAsEdge() and once my vehicle gets any amount of speed, it starts to bounce wildly. To simplify the problem, I removed everything except for 1 tire and gave it a constant torque and then I built two tracks:

The first one is made out of one really long edge and has no problems:
http://www.grozzler.com/temp/one-line.swf

The second one is made out of multiple edges and you can see the wheel begins to bounce wildly:
http://www.grozzler.com/temp/segments.swf

The friction is at 1.0 and the restitution is at 0 for the ground and the wheel. I've played with the gravity, density, iterations and time steps and nothing seems to help. Any time that wheel hits the corner of another edge, it jumps.

I'm out of ideas.

Anyone have some insights?


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 9:14 pm 
Offline

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1517
Location: Tokyo
Check out "4.5 Edge Shapes" and "4.6 Chain Shapes" in the manual.
http://box2d.org/manual.html#_Toc258082970

You might need a more recent version of Box2D though... not sure what the latest available for flash is atm.


Top
 Profile  
 
PostPosted: Thu Nov 17, 2011 11:49 am 
Offline

Joined: Thu Jul 23, 2009 2:15 pm
Posts: 7
Thanks a lot irresistible force, I've switched over to the Alchemy port and everything seems to be working great.


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], psbot [Picsearch] 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