Box2D vehicles
Uploader Comments (iforce2d)
All Comments (16)
-
@iforce2d no makes perfect sense. Thanks for the insight. I hope to get a working model of my own soon.
-
I made a tank like this a while ago, but keep the track tight with a tension spring. Worked pretty good. I really like your design for the monster truck tires too.
-
I just realized my first post didn't mention the EPIC tank you made, that was what my comments were all based around.
I want an epic tank so I can run over stuff and yell things. :)
-
@iforce2d I'm new to programming (june 2011, never coded anything before that) and ALL my games are heavy physics based. The trick I've been trying to do is getting a "chain" to wrap around the gear and connect the chain end to end so it's like a motorcycle chain or something. So far, Ive failed HARD to do this :) Basically, the chain breaks apart (I think due to position iterations and box 2d rounding numbers on crunching numbers). Yea, I feel your pain! haha
-
@iforce2d ieah. its little crappy and unusable.maybe i'll think of some modifications.
Any chance you give me come insight on how you made your monster truck tires?
mattbettcher 3 weeks ago
@mattbettcher The outer rim is a bunch of small rectangular polygons linked with revolute joints (same as the tank tracks). Each of these polygons is also joined to the center of the wheel with a wheel joint, set up so that the hub of the wheel becomes the 'chassis' body and the small rectangle is the 'wheel' part of the joint.
Hmm... that sounds a bit confusing huh :)
iforce2d 3 weeks ago
Circles and Friction in box2d are crappy. I use Corona SDK, and suffer issues. I found out I have to make circles like a gears, and change alpha to 0, then overlay a circle over that which is visible to the player.
The gear "teeth" (i use 16 or 32 teeth) will grip better on the ground. At least that's my experience in Corona SDK, not sure about cocos2d, or whatever you are coding in.
cellphonegaming 3 months ago
@cellphonegaming yeah, the amount of grip feels wrong. Your 'gears' sound a bit like what I tried in my 'platformer trial 5' video (PJogpLrkJqg) although I only have 4 of them :)
I think you can't rely totally on the physics if you want to get a nice feel. My first approach (see my trials 1-4 videos) was to completely control the character movement myself, but this is a lot of work and has some drawbacks. I think the gears method plus a little additional forces added might be the way to go.
iforce2d 3 months ago
amazing work. i've tried to implement walker by myself but all joints were kind of too unstable. So i did it in other way.
andronkolaider 3 months ago
@andronkolaider yeah, it aint easy. I think this one suffered from not being symmetrical enough. The legs went out of sync, but even if they didn't I doubt it would be very successful. Friction is a problem too, as you've probably noticed - I saw your video a while ago actually, couldn't decide whether that organic-looking style of movement was cute or creepy :)
iforce2d 3 months ago