Archived

This topic is now archived and is closed to further replies.

FlorianapoliS

X Direction?

Recommended Posts

quote:
Original post by Thunder_Hawk
This would be true if you rotate the y axis by 180o.

Hope that helps a bit.

_____________________________

And the Phoenix shall rise from the ashes...

--Thunder_Hawk -- ¦þ
______________________________


Don''t think I''m rotating it 180o, but if I did rotate it 180o would it correct everything?

Share this post


Link to post
Share on other sites
It sounds although you''ve forgotten that the Z axis goes negative into the screen, and planned all your geometry assuming a positive Z axis... which is effectively rotating your Y axis by 180 degrees.

Wow, i hope that made sense. This may be better explained with a diagram, except i cant draw.

Share this post


Link to post
Share on other sites
Ok, I''m detecting a lot of confusion in here. The way I see it, there are two distinct (and mutally exclusive) possibilities here:

1) You''ve somehow rotated the scene 180 degrees, or you''re looking at it from the other direction (-z instead of positive). This was suggested by Thunder_Hawk above.

2) You''ve got you''re model saved wrong: it assumes a left handed coordinate system (like Direct3D) instead of a right handed coordinate system (like OpenGL), or vice versa. This was suggested by sark.

If it was 1), odds are your car went backward the first time you tried it, and you added a negative somewhere to fix it. If it was 2), you probably got a car model from somewhere that was saving them with the opposite axes. Or, it could be a problem with the way you''ve set up the projection or modelview matricies. Or, something else entierly. Or, cosmic rays refelcting off the atmosphere of Venus and flipping a bit in you''re RAM. Without more information, I really can''t tell you.

Of course, my money''s on the cosmic rays.

--Khaydarian

Share this post


Link to post
Share on other sites
quote:
Original post by Khaydarian
Or, something else entierly. Or, cosmic rays refelcting off the atmosphere of Venus and flipping a bit in you''re RAM. Without more information, I really can''t tell you.

Of course, my money''s on the cosmic rays.

--Khaydarian


Yes, the answer to all 2-day bugs.

_____________________________

And the Phoenix shall rise from the ashes...

--Thunder_Hawk -- ¦þ
______________________________

Share this post


Link to post
Share on other sites
quote:
Original post by Khaydarian
Ok, I''m detecting a lot of confusion in here. The way I see it, there are two distinct (and mutally exclusive) possibilities here:

1) You''ve somehow rotated the scene 180 degrees, or you''re looking at it from the other direction (-z instead of positive). This was suggested by Thunder_Hawk above.

2) You''ve got you''re model saved wrong: it assumes a left handed coordinate system (like Direct3D) instead of a right handed coordinate system (like OpenGL), or vice versa. This was suggested by sark.

If it was 1), odds are your car went backward the first time you tried it, and you added a negative somewhere to fix it. If it was 2), you probably got a car model from somewhere that was saving them with the opposite axes. Or, it could be a problem with the way you''ve set up the projection or modelview matricies. Or, something else entierly. Or, cosmic rays refelcting off the atmosphere of Venus and flipping a bit in you''re RAM. Without more information, I really can''t tell you.

Of course, my money''s on the cosmic rays.

--Khaydarian


Yeah I too was exploring the effects of cosimc rays from Venus with little result.

My game is a GTA style car game (overhead racer). I translate -20.0f on the Z axis before I draw anything so that I can actually see the amount of the map I want. I don''t use a car model yet, its only a textured quad so I don''t think that would be effecting it? I only rotate the car on the Z axis by which way the car is facing, but when I rotate the car by 90 degrees it faces left? Everything is reversed almost? If you need to see any code just ask for what you need and I shall post

Share this post


Link to post
Share on other sites
Roating 90 degrees should point it left, assuming it started facing forward (top of screen). Positive is COUNTERclockwise when looking down the z-axis from negative to positive. If you want 90 to mean right, just, rotate by -yourdegrees.

edit - I said clockwise. X.x

[edited by - Deyja on July 19, 2002 11:57:17 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Wait... all this is relative. Your "right" can be mapped to negative/positive XYZ-axis. It all depends of your eye point position, look at position and up vector. I don''t know why ppl are giving you all these answers... there''s no answer to this except that it is RELATIVE.

Share this post


Link to post
Share on other sites
You would have to translate +20.0f into the screen, rotate 180 degrees on the y axis, and switch the sign of all the z''s in your rendering code.

Actually, 90 degrees should point UP, and zero should be to the right. You''ll likely save yourself some headache later if you go with this ''standard'' system.

Share this post


Link to post
Share on other sites