An odd (?) question
A short but odd question:
Would it be possible to apply physics and gravity to a 2d object in a 3d world? I want to make things like boxes etc. look extremely primitive like in Wolfenstien and use a combination of 2d animations and real physics.
What exactly do you mean? A box is a 3D object. If you want to mimic Wolfenstein using modern techniques, I'd suggest doing everything in 3D using only simple primitives like boxes. But the physics could be 3D. You could also constrain forces such that everything works for the 2D case. If this is not what you meant, maybe tell a bit more about what effect you are trying to achieve.
Greetz,
Illco
Greetz,
Illco
I think you mean using sprites (that generally face you no matter what direction you are looking at them from). I can't think of a reason why you couldn't apply physics to a 2-dimensional object in a 3-dimensional world. That 2-Dimensional object is actually 2.5-d which in turn means it appears 'flat' but still has all three of the x y and z parameters. You just need to get the 2-dimensional thing rendering the way you like in the 3-d world.
Yes, I mean a sprite, in that if you walk around it, it always faces you. What i was considering is having the sprite bounce whilst an animation makes it roll.
What you'd do is consider the sprite as a single point (at the center of the sprite) in 3D space and apply your physics to that point, but when doing everything else (eg. collision detection) take into consideration the bounding box (which will have a fixed orientation, most likely axis aligned) of the sprite so you don't get problems like the sprite half going into the floor while it bounces.
Quote:Original post by golar
Yes, I mean a sprite, in that if you walk around it, it always faces you.
That technique is called BillBoarding [smile]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement