[ODE] Two Dimensions?
shalinor at gmail.com
Thu Aug 4 13:16:03 MST 2005
Er, option 2 has a number of problems, doesn't it?
Off the top of my head:
- So you have a 2D pile of boxes in your 2D platformer, and set of an
explosion force. Friction, collisions, and unexpected numerical
inaccuracies push some of these boxes off the plane of your 2D game.
Now your 2D-moving character never hits the boxes, but since you just
ignore that extra axis, it LOOKS like he should.
- 2D ragdolls. These guys would flop aroun in all manner of improper
ways with proper limits to a 2D plane.
- Friction forces against an angled surface. Go back to the box pile,
where boxes have fallen slightly off your plane, at an angle to your
2D gameplay plane. Friction forces acting against your hero push him
off the plane of your 2D game as he runs into the box and pushes
around it... now EVERYTHING is skewed off from him.
How'd you solve these problems?
> I tend to have done two things:
> 1) Use joints suitably that restrict that extra degree of freedom; use a
> hinge instead of a ball joint, with the axis coming out of the screen.
> This slows everything down [performance of ODE is very very related to
> DoFs removed]
> 2) Don't do anything different, and simply render ignoring the axis that
> comes out of the screen
> I've had most success with number two. The differences on screen are
> negligible [point gravity in a suitable direction and mistakes will tend
> to correct themselves over time anyways].
> Has some very old, out of date demos, that I wrote using ODE in Torque2D.
> It was purely a T2D<->ODE demo, so don't expect anythign more than what
> you see. For reference, it's using option two above; the joints are all
> ball joints, and you simply never know. When I used option one,
> everythign went a whole lot slower.
> Gary (-;
> ODE mailing list
> ODE at q12.org
More information about the ODE