User Tag List

Results 1 to 4 of 4

Thread: OpenGL Collection--Efficiency of Camera?

  1. #1
    No Products Registered

    Join Date
    Aug 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OpenGL Collection--Efficiency of Camera?

    The title of the thread couldn't hold all of the characters I wanted... >.>

    Anyway... So I've been playing with the OpenGL collection extensions, and fiddling with the 3D sprites features. I've gotten a lot of cool stuff figured out, but despite all of that, there are two little camera tricks that I want to try and work.

    First one is... I want to implement a full, 3D spherical looking with the camera. I've done it already by using the pitch feature, but now what I need to do is try and make it rotate on all three axes based on how the mouse moves onscreen.

    The next thing I want to accomplish is, when I am looking in a different direction, and I push a movement key, I want to move along the horizontal plane axes only, without moving up if I am facing up or down in the slightest amount.

    Does anyone know a way to get both of these working properly? I want to experiment with those functions if I can get them behaving right. Thanks in advance~!

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: OpenGL Collection--Efficiency of Camera?

    For the mouse thing you could get the mouse position then use the screen size and divide that down for X/Y to map the values to a range simply. Either that or just set up some sort of system to move +1 or -1 position etc when the mouse if hovering over the edges every set amount of time just like how you would for a 2d system. With more axis though it would be slightly more complex but that could be the basic idea of one.

    To move forwards etc without going up rather than using move forwards or backwards etc instead set the position. So for example set the Z to Z( "OpenGL Camera" )-1 and Z( "OpenGL Camera" )+1 etc.

    That way it uses the last position and moves from that so you won't fly.

  3. #3
    No Products Registered

    Join Date
    Aug 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: OpenGL Collection--Efficiency of Camera?

    EDIT: Scratch that. It worked for a second. I can move along the axes, but nowhere else. Is there anyway to change the orientation of the axes to be always parallel/perpendicular to your own movements so that you can avoid always traveling along the set axes?

    Could you put a quick code example of how the math works for the first part of the post is supposed to go? o-o

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: OpenGL Collection--Efficiency of Camera?

    You only need to manipulate 2 rotation axis for mouse controlled looking.

    The X and the Y

    You link the mouse's X movements to the X rotation
    and the mouse's Y movements to the Y rotation

    I suggest you lock the mouse cursor to a point on the screen then record it's X and Y distance from that point and add those numbers to the rotation values of the camera.

    That's how I did it in DarkBasic years ago.

Similar Threads

  1. OpenGL Collection Beta download
    By Min in forum OpenGL
    Replies: 2
    Last Post: 15th May 2017, 06:24 AM
  2. OpenGL collection
    By Min in forum Extension Development
    Replies: 226
    Last Post: 2nd January 2014, 12:36 AM
  3. Memory Efficiency
    By Asholay in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th December 2012, 12:31 AM
  4. Camera View with OpenGL extension?
    By Stephen in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 27th October 2008, 11:04 PM
  5. Debugger and MMF2 efficiency?
    By AnotherFreak in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th April 2007, 01:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •