Jump to content
  • Advertisement
Sign in to follow this  
LabRat404

very weird world rotation

This topic is 4948 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've currently developed an engine that parses .MAP files, successfully creates polys out of the plane descriptions, partially maps textures, and I've successfully developed a method for collision detection. my problem is this: when I create a simple level and run it, the collision detection works the exact opposite as you'd expect. its like a mirror image of the world made up of invisible walls that you cant walk through. I've determined, to put it simply, these "invisible" walls are the same as the others, only spun 180 degrees on the z axis ( normally the y axis. Valve Hammer Editor uses the left hand coordinate system ). what could cause this? I've tried flipping some axis, like instead of rendering glVertex3f(x,y,z), I would try glVertex3f(y,x,z), but things just get confusin. I've also tried glRotatef(180,x,y,z), but thats no different from just moving my mouse to turn a direction...I think. any input on this would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
If it's anything like 3D studio MAX, you'll have to swap the Y axis with the Z axis and then invert the resulting z axis.

So:

X = X
Y = -Z
Z = Y

I think. It may be negative Y instead of negative X, I forget. But that should help you out at least.

Share this post


Link to post
Share on other sites
that makes a little bit of sense. in Valve Hammer Editor, the Y axis and the Z axis are switched. (X Z Y). its not a perfect mirror image, but I'll play with it fora while. thanks!

Share this post


Link to post
Share on other sites
yep. thats just it. I had to swap the y and z values and then invert the y (which was just the z)

for x y and z:

x = x
temp = y
y = -z
z = temp

thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!