Jump to content

  • Log In with Google      Sign In   
  • Create Account

CmasterG

Member Since 12 Jul 2013
Offline Last Active Aug 12 2013 09:51 AM

Posts I've Made

In Topic: Box Zoom

06 August 2013 - 08:13 AM

Hi!

I mean zooming. I already have the corner points from my rectangle, and now I want to zoom in. The rectangle can be everywhere on the screen and I use perspective projection.

Can you give me a link for the formulas ? I don't know how to calculate it.

Thanks :)


In Topic: Focus to object

05 August 2013 - 12:26 PM

Hi. Thanks it works now :)


In Topic: Focus to object

26 July 2013 - 04:01 AM

HI!

What I want is that the model (bridge) will fit to screen. So when I am too close with my camera I want that it zoom out so that the model fits to screen, and when my camera is too far away, I want that it zooms in so that the model fits to screen. I want sort of a focus function like when you press in Autodesk Maya the "F" Key, but with the difference that it should zoom in or out in the direction of the looking vector. Do you know what I mean? 

For the position of the camera I use sphere coordinates instead of cartesian coordinates. So  I have two angles and a length. For zooming I only have to change my length to the object.

What I did with the code was the following: I take my corner points of the model (bounding box) and transformed them from world coordinates in screen coordinates by multiplying the coordinates of the corner points with my world matrix, view matrix and projection matrix. Then I took the ratio between the size of the whole screen (screen_width, screen_height) and the size of the rectangle which is formed by the bridge on the screen ( height = max_y - min_y of the bridge in screen coordinates, width = max_x - min_x) and then I multiplied my camera length by this ratio. The result is that it is jumping back and forth when pressing the key for the fit to screen function.

BTW: the bridge is always in the center of my "world".

Do you have an idea why it is not working correct?


In Topic: Game development, which path should i choose?

24 July 2013 - 01:40 PM

I think it is a good idea to make tutorials for OpenGL or DirectX. Have a look at rastertek.com or http://www.opengl-tutorial.org/

It is good to know this low level things, because then you can work with every engine you want to.

 

Unity is very simple. It depends on what do you want to make. If you want to make a game just for fun than take Unity. You can make great games with it, but when you want to become a game programmer than learn OpenGL or DirectX.


In Topic: Why companies still use C++ and what should I learn then

24 July 2013 - 01:36 PM

Hi! I am the same opinion. At university I started with C, then with Assembly, then Java.  C++ and C# I have learned on my own. It was really easy when knowing C. So I think it is good to know a low level language, because it is very easy then to learn higher level languages.

Now I can also Python, which I have also learned on my own.


PARTNERS