2D world 3D characters

I really love the Panda3D engine, but I simply don’t have the will power or development team to make a decent 3D game, and recently I’ve been seeing some 2D projects on the forums. I’ve been thinking, what if I loaded a bunch of sprites to make an environment(in aspect2d) and then loaded a 3D model as a Character for this environment, this way you have the fluent movement of 3D yet you don’t have to deal with camera angles and all the 3D stress.

Problem is I have no idea how I’m going to do collision detections with a 3D object to a 2D object, especially if the 3D object isn’t actually colliding with the 2D sprite, but rather moving over it. Any ideas?

I’d really like to try this idea, I’ve seen it used in other games, and I’d like to use it myself to reduce the work load of some of my game projects.

Use the Bullet port for physics, and have invisible 3d collision geometry over your 2d sprites. So your collisions will be 3d, though your world is 2d.

I was thinking about doing this, I also just remembered something from when I was having fun with Pygame and ODE a year or two ago, I was doing a 2D game with a 3D feel, I was using ODE for physics and collision, I had 3D ODE bodies representing the 2D sprite. This way I could calculate whether the sprite has fallen off the level.

I think I could do the exact opposite, don’t bother with the 3rd coordinate, just use ODE for 2D physics. I could create 2D collision bodies in ODE, and a 2D collision body for the Actor, then collision detect with ODE. I don’t know if this is what you’re saying, also I would use Bullet but I have more experience with ODE and ODE is provided with the Panda3D engine.

But one thing that I’m kind of confused about is the coordinate system for aspect2D, can I do pixel based coordinates? Like most 2D engines provide?

I am not sure about pixel based coordinates. I do believe Panda only uses its own window coordinate system that starts at 0 and goes to 1. You can easily convert this to pixel coordinates by using the formula

xPixelCoord = windowWidth * pandaWindowCord

And example would be this:

512 = 1024 * .5

So we know that .5 in the Panda window is 512 pixels.

I am not sure about pixel based coordinates. I do believe Panda only uses its own window coordinate system that starts at 0 and goes to 1. You can easily convert this to pixel coordinates by using the formula

xPixelCoord = windowWidth * pandaWindowCord

And example would be this:

512 = 1024 * .5

So we know that .5 in the Panda window is 512 pixels.

Alright, so I could probably make an Object to represent the screen, and just implement a pixel based coordinate system from there. Doesn’t seem too hard.

Thank you for your replies.

Correct me if I’m wrong, I thought there was a coordinate system in panda already based on pixels. Called pixel2d, instead of aspect2d or render2d.

I’ve read about it a few places on the forums, perhaps it’s of use to you?

~powerpup118

Oh? That would save me alot of time, and simply make my life easier. Is there any documentation on it? Or is it just like aspect2D but rather pixel based coordinates.

I’ll have to tinker with it, thanks for the tip.

Yeah, it’s like (X, 0, -Y) in pixel coordinates.