jueves, 3 de marzo de 2016

Nerdy Run Día 5 - Problema de ángulos | Nerdy Run Day 5 - Problem with angles

Español | English

Hoy me dediqué a inventar un poco como va a ser uno de los mini-juegos, específicamente, el rompecabezas. Este mini-juego se va a tratar de clickear en unos sectores para que estos roten y al tener las piezas en la rotación correcta, ganamos el mini-juego.

Para esto había creado 4 botones grandes que van a ser parte del GUI, el objetivo ahora era desarrollar la mecánica, luego me voy a encargar de como incorporar el mini-juego al juego original y como hacerlo desaparecer. La acción que va a realizar cada botón si se lo presiona va a ser de rotar 90° en el eje Z.



Para empezar rote inicialmente cada botón, haciendo que el objetivo se convierta desde otro punto de vista, en rotar el botón hasta que el ángulo de rotación de este sea 0°. Pero ocurrió un pequeño inconveniente matemático. Resulta que si el botón inicialmente estaba rotado 270°, al rotarlo debería dar 360° que sería equivalente a 0°, pero resulta que hacer esto da valores como "2.897804e-05" lo cual debo resolver. Debo revisar si estoy usando los métodos correctos para rotar los botones y debo hacer las cosas de otra forma o si es un simple error que pueda solucionar fácilmente.

Por lo que después de solver este inconveniente, debo realizar los otros mini-juegos y continuar creando los obstáculos para tener la base del juego y después dedicarme a el arte de este.

-L

---------------------------------------------------------------------------
English

Today I've dedicated my time on creating what will be one of the mini-games, specifically, the puzzle. This mini-game will be about clicking on the sectors to make them rotate and if you have the pieces on the correct rotation, you win the mini-game.

For this I've created 4 big buttons which will be part of the GUI, the objective now is to develop the mechanics, I'll later take care of how the mini-game will be incorporated on the main game or how will it disappear. The action that every button will run is to rotate 90° itself on the Z axis if it was clicked.


To make this, I initially rotated each button, making the objective, seen on another perspective, to rotate the buttons until the angle of rotation is 0°. But there were some mathematical problems. It turns out that if a button was initially rotated to 270°, after rotating it, it should give an angle of 360° which is equal to 0°, but istead, it  gives values like "2.897804e-05" which I need to solve. I need to check if I'm using the wrong methods to rotate the butons and I must do it in another way or its just an error I can simply solve.

After solving this issue, I need to create the other mini-games and continue to make the other obstacles to have the core of the game, I'll later add the art.

-L

No hay comentarios.:

Publicar un comentario