SGD300 - week 10 Devlog


Introduction

This week was a continuation on the formations that were started last week. This week focus was on actually making the players get into formation and move in formation according to the currently selected player.

Goals

1. Continue working on the Formation Script

2. Add the last two formation buttons.

3. Create the last two formation scripts to  complete the formtion behaviour.  

Personnel

Primary - Nathaniel Hughes

Technologies, Tools, and Resources used

Provide resource information for team members who wish to learn additional information from this log.

* [Formation ideas](http://www.jeremiahwarm.com/coordinated-movement.php)

*[Array Scripting API](https://docs.unity3d.com/ScriptReference/Array.html)

*[Centre of Mass example](https://forum.unity.com/threads/finding-the-center-of-mass-of-a-collection-of-rigidbodies.87578/)

Tasks Undertaken

1. Complete the square formation

2. Complete the circle formation

3. Complete the wedge formation

4. Complete the wall formation

What we found out

This week was the continuation of the formation work started last week. I didn't really add anything new to editor but have made small steps forward in understanding an implementing the code. The center of mass method i created last week turned out to be far more important than i had previously believed because i'm now using it as a means to place the units into their proper positon in the formation.

The center of mass calculates the mass of untis using their average masses from a center point in the formation. This is then used with the offsets to set their position  according to the chosen formation. Using this Vector three output from the center fo mass calcuation we can set the units position in the proper formation script.

Solution Justification

This was the continuation of my work from week nine in creating formations.

Get SGD300

Leave a comment

Log in with itch.io to leave a comment.