Just when I thought I could see the sun I was cast down again into darkness. I've been working on this problem for several days with limited success.
I'm trying to implement full screen rotation in an overhead-perspective game. The angle of the screen is locked to the angle of the player. If the player turns then the screen also turns, meaning the player is always facing "up". Here is an example of exactly what I'm trying to do: http://www.youtube.com/watch?v=lX_bhygaSy0 These are the variables I'm working with: orientation ' Player/camera's angle in degrees (Rad(orientation)). bworkspace ' Image buffer containing the original non-rotated background. brotated ' Image buffer containing the new rotated bworkspace. cx ' Camera's x coordinate in bworkspace. cy ' Camera's y coordinate in bworkspace. brotated is larger than bworkspace because the rotation function doesn't crop the rotated image: http://www.eightvirtues.com/sanctimonia/images/bworkspace.png (512x512) http://www.eightvirtues.com/sanctimonia/images/brotated.png(725x726) How do I convert the camera coordinates (cx, cy) in bworkspace to the equivalent coordinates in brotated? Essentially I need bworkspace to be rotated around (cx,cy), but the rotate function only rotates about the center of the image. Because of this I think I need some combination of rotating (cx,cy) about some point and offseting it as well. Reading my own email it sounds simple, but I've tried so many things that I can't believe I haven't solved the problem through sheer luck. -- Kevin Fishburne Eight Virtues www:http://sales.eightvirtues.com e-mail:sa...@eightvirtues.com phone: (770) 853-6271 ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user