Orientation Problem
All what I want to do is to implement strafing to tutorial 10...
but how? I have no idea how to calculate the new X/Y Position on the (already rotated) matrix.
Edited by - copy_constructor on January 1, 2001 1:28:20 PM
How are you calculating your translation variables (px, py and pz) - if these are not computed correctly you end moving about at weird angles, check NeHe''s site (nehe.gamedev.net) and I think tutorial 10 "Loading and moving through a 3D world".
There should be some information there for you.
-Mezz
There should be some information there for you.
-Mezz
This has been a bugger of a problem to me a couple of times.
check how you''re specifying your angle (radians or degrees) as OpenGL works in degrees.
also check which matrix you''re operating on...
finally, the time honoured solution of brewing YAFCOC (yet another damn cup of coffee) and staring blankly at your screen for six or seven hours randomly clicking and changing variables will always work in the end... (even if not for very long!)
check how you''re specifying your angle (radians or degrees) as OpenGL works in degrees.
also check which matrix you''re operating on...
finally, the time honoured solution of brewing YAFCOC (yet another damn cup of coffee) and staring blankly at your screen for six or seven hours randomly clicking and changing variables will always work in the end... (even if not for very long!)
_________________________________I used to be indecisive. Now I'm not so sure...
finally, the time honoured solution of brewing YAFCOC (yet another damn cup of coffee) and staring blankly at your screen for six or seven hours randomly clicking and changing variables will always work in the end... (even if not for very long!)
hey i dint know that was a popular technique!. I tht it was unique to me
Tutorial 10 is nice, but my problem is
how to implement strafing in this code?
how to implement strafing in this code?
calculate the movement as if you were turned 90 degrees in one direction or the other!
anotherwords....
x += sin(direction + 90) * distance;
y += cos(direction + 90) * distance;
or however the formulas go.
l8r,
Rob
http://tannara.2y.net/
anotherwords....
x += sin(direction + 90) * distance;
y += cos(direction + 90) * distance;
or however the formulas go.
l8r,
Rob
http://tannara.2y.net/
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
Again AvianRR, you come up with the useful stuff!
RealityMonster - It''s actually taught in my CS course at uni. There''s a lot of people doing the course that have no idea that successful programming has as much to do with sleep deprivation and the phase of the moon, as well as program design and good commenting...
One of our lecturers marked us down ONLY because we didn''t use HIS indentation technique. Ours was consistent, but noooo...
(Not that I''m bitter...)
RealityMonster - It''s actually taught in my CS course at uni. There''s a lot of people doing the course that have no idea that successful programming has as much to do with sleep deprivation and the phase of the moon, as well as program design and good commenting...
One of our lecturers marked us down ONLY because we didn''t use HIS indentation technique. Ours was consistent, but noooo...
(Not that I''m bitter...)
_________________________________I used to be indecisive. Now I'm not so sure...
khrob - Of course I come up with the usefull stuff! I''m a fountian of uselenss, er.... usefull information, and I like to help people. Now I just need to find a company that appreciates that!
RealityMonster - Is Mountian Dew an acceptable substitute for coffie???
l8r,
Rob
http://tannara.2y.net/
RealityMonster - Is Mountian Dew an acceptable substitute for coffie???
l8r,
Rob
http://tannara.2y.net/
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
speaking of fountains, I trust everyone had a good new year?
avianRR - what''s your main area of expertise? gfx? what sort of company you looking for?
avianRR - what''s your main area of expertise? gfx? what sort of company you looking for?
_________________________________I used to be indecisive. Now I'm not so sure...
General windows programming
a litte bit of Linux.
a lot of 3d theory (everything form rotations to ray-tracing)
and a rapidly expanding knowledg of OpenGL!!!
I'd like to work for any company where I get to do gfx, or game programming!
Edited by - avianRR on January 3, 2001 8:37:55 AM
a litte bit of Linux.
a lot of 3d theory (everything form rotations to ray-tracing)
and a rapidly expanding knowledg of OpenGL!!!
I'd like to work for any company where I get to do gfx, or game programming!
Edited by - avianRR on January 3, 2001 8:37:55 AM
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement