hi,
have uiimageview representing level of "artificial horizon" in plane. blue sky, brown ground. image clipped super view creates square.
when i move nose of plane up, move image down:
when move nose of plane down, move picture :
called "pitch"
far i've been modifying x axis of image:
code:
imagehorizon.center = cgpointmake(imagehorizon.center.x, imagehorizon.center.y + valuetomove);
when "roll" plane rotate picture either left or right:
code:
imagehorizon.transform = cgaffinetransformrotate(imagehorizon.transform, angletorotate*(cgfloat)(m_pi/180));
now, problem once rotated picture , want modify "pitch", dont know formula use find correct x,y move picture towards sky or ground direction:
in other words, when rotate picture angle β, x, y value add center of image move on red line ?
help,
tex
maybe : http://forum.onlineconversion.com/showthread.php?t=5408
know have seen better tutorial on this, can't find anymore, sorry.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment