Sunday, 27 September 2015

First Project - Scripts : 27-09-15

I was focusing on the script writing this week and got a lot of useful help from Sean. I spent too much time trying to fix the NPC's movement script before contacting Sean, the problem was the new vector with a random x and z position kept changing each frame in the updates function. Sean managed to fix it by changing the vector to its own function.

I also had an issue with reading a script in an object being hit by a ray and transforming the position of a UI slider to match the position of the player character. The first one was easy to fix just by showing hit.collider.gameObject.GetComponent under the raycast if statement, but I had to create it twice for the left and right sides of the character. Sean sent me a blog post that greatly help the problem of changing the sliders position.

blog.manapebbles.com/world-space-overlay-camera-in-unity/

I now have most of the scripting completed, just need to fix the current bugs and create a main menu script.


No comments:

Post a Comment