|
|
Am 2017-05-29 15:42, also sprach dick balaska:
> I'm trying to master converting a vector to an angle in 3D with no luck
Help, Math wizards, you're my only hope.
Ok. I'm stuck. I'm missing something.
My goal is to position an object in a fixed position on the screen, like
carrying a flashlight. Or a gun, like in a video game.
So I need to calculate the angle of Lookat-Camera and act on that.
My primary macro works, but I'm missing something in determining the
position of an object that is not exactly on the look_at. I can't
figure out if I need to subtract an angle or a vector or from whom.
For example, in this screen shot,
http://www.buckosoft.com/tteoac/video/testRenders/test001.png
the red ball is look_at,
the cyan ball is the angle correctly derived from (look_at-camera),
but the green ball is only correctly 1 unit horizontally to the right of
the cyan ball for this angle <0,0,0>. Otherwise it spins incoherently
(to me) around the cyan ball. Interestingly, it keeps the correct distance.
http://www.buckosoft.com/tteoac/video/testRenders/test.mp4
argh. I keep trying to work it out on paper, but I'm not feeling it.
--
dik
Post a reply to this message
Attachments:
Download 'test.inc.txt' (3 KB)
Download 'animtest.ini.txt' (1 KB)
|
|