Camera Movement

Project: Armament
Role: Game Programmer
Completed: 119.03 Cpl Wallace Donegan Game Programmer
Start Date: 3/10/2018 03:25
End Date: 3/12/2018 22:11
We need a basic RTS style camera, that views the map from the top down. The camera needs the ability to move around the map easily to view all corners and find all units.
Camera Movement

No Public Asset Available

Complete Task
4.00 HR.
I worked on this all afternoon, probably could have downloaded a finished solution from the asset store but I didn't feel that was appropriate and I enjoy doing it myself more. I could probably submit it now as finished and sync project but I'm tweaking a few things. It wasn't part of the task but I'm adding terrain along with this agenda so the camera has something to raycast. Taking a break to eat. I often stay up all night as I work best during those hours so I'll be finshing this up tonight. 

6.00 HR.
I have created sandbox folders in the unity project, delta branch. Within that folder, i created a personal sandbox folder and various subfolders. There is a development scene that can be opened, it contains a quick test terrain, a camera that moves with WASD and mouse at the screen edges, the camera script is set up in the unity editor, inspector panel with the main camera selected. I'm going to do more with the camera but it's far enough along to complete this task. (I been up awhile need a break before I continue.) I have checked in the changes I made with the MCU tool. 

538.05 SSgt Anthony Michelizzi

@Wallace I did see your code changes thank you for submitting them.  Will the model terrain work with this camera as well that Jonathan already did?

I'm not sure that it will at this point though i will look into that. I believe @Jonathan created a height map in Blender from his terrain model. if that is the case we can import that height map into unity's terrain system. The reason for using Unity's terrain system is that the terrain collider works off the terrains height map. It updates whenever the height map updates. Navigation meshes are then used with the units to automate unit navigation. I have been working all morning on getting a navMesh setup on the terrain piece that I had made. I now have a Terrain with the collider, with a 'Navmesh', and a unit from the 'Units>LandUnits>1434' I believe that has a collider and a 'NavMeshAgent'. I created a 'MouseCaster' class that attaches to the camera, it uses its instance to initialize static variables. Basically, from any script in the scene, you can call 'MouseCaster.GetHit()' or one of the method variations I made and get ray-cast results from the mouse. Using this mouse coaster and the terrain collider, and navMesh system I have a unit that I can move around the scene simply by clicking terrain somewhere, it finds a suitable path and starts moving. I'll make a video of it shortly when i finish dealing with a rotation issue. @Jonathan Can you make or send me that height map from your terrain model? Or is it in the project files somewhere? Id love to get your model in-game and working rather then the quick one i made. 

@Wallace Did you upload a scene am I missing it?

yeah there is a scene in Assets>Sandbox>Wallace>DevScene or DevTestScene something like that. forgot what I named it. Taking a break while MCU is working, I take it I should switch branches to Charlie correct? I was uploading last changes before I switched. I just reinstalled MCU again this morning... offtopic feature request... the ability to update vs reinstall and reboot for MCU. 

Yes please switch to Charlie after this one is done.  The feature has been corrected and added back into the MCU application.

Wallace I don't see that scene in the delta branch will you try to do another check in please.

I did another check in today before I switched to Charlie and got everything transferred over. I will try to check in with Charlie. All I've done is copy the Sandbox folder over and make sure everything is working. 

A screenshot of the scene open in unity from charlie branch and the check in success screen

Wallace This is what I see right now from Delta.  This might be an issue with MCU checkin.   Can you tell me what file is missing and where it is suppose to be in the directory please.
Screen Shot of Unty

We are going to move the discussion about the terrain to this forum created by Jonathan.

Hireacrchyproject files
I can barely make out the screenshot but I can see the DevTesting scene in the project folder in the lower right of that screenshot.. the scene has a white and black icon that looks like the unity symbol

Here is what i see in both Delta and Charlie.  So it looks like we have an issue with the checking in for MCU?

Screen Shot

Hmm, perhaps the prefab files are not transferring properly. I'll Check in with Charlie branch again and let you know when I'm finished, maybe I goofed something up.

I checked in charlie branch again, let me know if it worked

@Wallace Will you zip your project up and share it please it is still missing in Charlie and I want to find out why.

Thank you will get to the bottom of why its showing as missing asset in the branch.

I am also having a problem with updating the unity project file. perhaps I'm not allowed to modify that file but I added an axis in the Edit>ProjectSettings>Input panel. Every time I sync the project those setting changes are removed and reset. 

I am not using the scroll wheel axis because I'm drastically changing the sensitivity (returned value) of the Zoom axis. 

ImputManager in Project Settings.

@Wallace I figured out the issue. It was with the get latest function on TFS not sure why but the prefab check in at 5PM today just would not download to my system into the Unity Charlie branch directory.

@Anthony will you do a get latest on the Charlie branch and see if that asset buggy is missing?

In the end I think this is user error on my part sorry for the delay.

@James No big deal man, we just did kind of a major switch and there is going to be some teething issues to start. Having prefabs update properly between team members in a Unity project is kinda of important. I just made a video showing what I've done so far and am uploading it now, I'll post a link when it's finished. I also got the unit rotation with terrain finished. And it will work with any type of terrain system we decide to use. (hmm... should work anyway).

538.05 SSgt Anthony Michelizzi

Pulled latest on Charlie tonight. Still getting the same Prefab error we were last night @James.

@Anthony Will you check the Charlie > sandbox > Wallace > prefab folder in TFS if it says the buggy is the current version which last I check was checked in at 5:03pm abouts.  For some reason when I did a get latest that one file did not update not sure why.  But after I did a manual update on it alone the missing prefab issue went away.

James Fleming