Skip to main content

week 7

For this week I will be keeping my focus on the android controls as too much of my attention is going towards my learning outcomes, just an update on my learning outcomes, I have finished two of my learning outcomes which are mesh deformation and persistent score in a side project meant for my external learning outcomes.

While working on the android controls I watched a tutorial to understand how unity’s event system works as I have not worked with it before , it seems to be simple enough although I made a few human errors while coding the OnPointerdown method visual studio prompted me to fix an error which I miskicked and it added the code “throw new System.NotImplementedException(); ” which made the errors go away although it was not something I understood & it was not meant to be there, rather it was supposed to take in the pointer event data which is shown in the screenshot below. The following gets the event data of the joystick being pressed when the pointer is pressed down , in my case I am taking in the same information as on drag ,






 The on drag function takes in event data from the mouse which in the code below is pointerEventData , the code here moves an image as a joystick which can be seen in the screenshot below.  The code in the OnDragfunction is used to detect in which direction the mouse is being moved and this is a value between -1 -0-1 












In the code it detects the position of the image to determine whether or not it has moved & how much it can move .
As we could not fix the problem on our own, we consult our facilitator after a few minutes of troubleshooting the problem we noticed that the animators software had the wrong forwards set & the models themselves were rotated too which was read by unity as 0,0,0 when it was 90,0,0 . After we set the x,y,z to vector3.zero it seemed to work and we did not face any problems .
While integrating our project , it took us a few hours longer than expected due to the models but we are confident that we will be able to show progress for our project this semester .



Another thing we discovered this week was that the models we got did not have the same z axis as the other models in unity had, this could not be fixed by rotating the object as a lot of the code would already be rotating the object, luckily our animator was in the day we found out which also happened to be the day we were integrating everything which gave us ample time to fix the problem with our animator. After a few tries of fixing the problem we could not solve the problem which made the z axis look in the y direction, this can be seen in the image below. 

Comments

Popular posts from this blog

week 11

For this week I will be learning some basic animation from one of the animators to understand the workflow of other fields and in doing so I have modeled some basic objects such as a table, chair and a few other things visible in the picture below. Another learning outcome I have been working on is around making a API wherein I decided to make a dll file , the reason I chose a dll file was because this is something new to learn and it is a good way to protect my code from being used by unauthorized users . To start off on learning how to make a dll, I started with looking at lots of guides but noticed a lot of them were not using monobehaviour which is something I needed to run my steering behaviors as they use man classes found in monobehaviour such as transforms and vector3. After some assistance from my lecturer I have been able to find the right resources and start working on the dll itself but more things are yet t...

Studio - 3 Week-5

For this week I have been working on setting up by SQL database on localhost but I know nothing about it and I will be researching on how to make a table, learning the right syntax to use in php to communicate with the SQL server. The PHP code necessary for connecting to the SQL database on localhost is pretty simple as all you have to do is declare in the information needed to login into the database such as the server name, database user, database password and the databases name which can be seen in the snippet below. Next, we need to form a connection to the database and check if we are connected before we can go ahead, this is a small optimization. In order to connect to the database, we declare a reference $conn which will equal to mysqli_Connect which is the syntax needed in the PHP script in order to form a connection. The if condition only checks if a connection is made and if it has not then it will kill the connection with a die functio...

week 12

This week we were going to start building our final builds however we found a new bug which was due to poor design from my end as a programmer, last week we fixed the issue with the player partially being the in the wall however this created a new problem wherein the shields did not take and damage and this is really bad as it is a major game mechanic. To fix this issue we tried many solutions , but they all seemed to be having their own flaws & drawbacks thus we eventually decided to keep the rigidbody on both the shields and made the main objects box collider bigger with the shields box colliders being slightly bigger than the main bodies , this made the collision work properly and was a simple enough solution however I feel like this situation could have been avoided if better tech design decision would have been made from the beginning  . Once all the problems were solved I started working in 3ds max again to cr...