Skip to content

Basic AR shooting game based on Gyroscope to make targets appear .

Notifications You must be signed in to change notification settings

jaibeer72/AR-Basic-Shooter-Target-Game

Repository files navigation

Prospects 2

Augmented Reality. 2

What It is? 2

Pre Requisites 2

Vuforia 2

Case Studies of Vuforia. 3

Prospect and Scale 4

Virtual Reality 4

What It is? 4

Pre Requisites 6

Prospect and Scale 6

Hack and Slash linear game. 6

What It is? 6

Pre Requisites 6

Ideation 6

Town Of Salem 3D 6

About Town Of Salem 6

Why in 3D? 7

First Draw AR. 7

What is a First Draw? 7

How will it work in AR? 7

Magic Mindset 8

Basic Idea and rules a VR game that can be basically a magic throwing to destroy enemies 8

[Finalised Game: AR 8

Why deciding AR? 8

Beginning. 8

[Image Tracking 10

Setup :- 10

[User Defined Target 12

Understanding the code: 13

[Monster Eater 16

AR target shooter 16

Working on a better version 19

The Result 23

Working on better things. 24

Animation control. 27

[Final Result 33

Prospects

  • [Augmented Reality

  • [Virtual Reality Game

  • [Brawlers

  • [Racing

Augmented Reality.

What It is?

"An augmented reality app (AR app) is a software application that integrates digital visual content (and sometimes audio and other types) into the user's real-world environment. AR software is used for training, work and consumer applications in many industries including healthcare, public safety, gas and oil, tourism and marketing."1[

[

[Basically, the idea of adding a layer of an interactable environment to the existing environment can be a way to describe augmented reality.

[Pre Requisites

[Things that you require before you can build anything with these apps are simple

[Knowing

  • [The platform you will be building for. This can be IOS, Android or

    even other OS's but they need to have a supported framework.

  • [Engine: Software that can convert, power and render different types

    of data into content.

  • [A framework that can be pre-defined code that can help you

    implement the process with a predefined pipeline. For example, Viforia which I will get into in a bit

  • [Or an SDK.

[Vuforia

[This is one of the most used AR frameworks in the industry. The Vuforia engine boasts a lot of features to help in the process which includes the following2[

[ {width="5.723958880139983in" height="3.841327646544182in"}[

[Let's look at some case studies.

[Case Studies of Vuforia.

{width="6.270833333333333in" height="3.4027777777777777in"}3 [This was a game which used Vuforia to give the LEGO world a more interactive twist. The idea was simple The LEGO toy company had these toys that they wanted to add a more level of interaction to and help their customers have a more fun experience with them so they introduced a game that used AR to allow them to have a richer experience with the toys.

[Prospect and Scale

[As the industry matures the idea of it to be restricted to games is very naive. The implications of this may be limited based on technology as the technology has to go through its hurdles with its Technological limitations such as graphics requirements for math computations and sometimes it might be a little difficult for the user to understand what is going on.

[

[When it comes to businesses there are huge implications as it helps business to showcase their products before they have fully realised them and can just use 3D models to showcase the strength of the product they are trying to introduce.

[Virtual Reality

[What It is?

["Virtual reality (VR) means experiencing things through our computers that don't really exist. From that simple definition, the idea doesn't sound especially new. When you look at an amazing Canaletto painting, for example, you're experiencing the sites and sounds of Italy as it was about 250 years ago---so that's a kind of virtual reality. In the same way, if you listen to ambient instrumental or classical music with your eyes closed, and start dreaming about things, isn't that an example of virtual reality---an experience of a world that doesn't really exist? What about losing yourself in a book or a movie? Surely that's a kind of virtual reality?" 4[

[

[The idea of experiencing a different world through the lens of a computer where everything is possible has always been an exciting prospect for people. VR as an industry has been ever expanding and its availability also increasing through the gaming world with oculus rift, PSVR so on has always been the new generation of trying things. Things such as the open project like google cardboard have further helped its growth but mainly now being used in the world of Real estate to help people buy better has also been a great opportunity.

["Types of virtual reality

["Virtual reality" has often been used as a marketing buzzword for compelling, interactive video games or even 3D movies and television programs, none of which really count as VR because they don't immerse you either fully or partially in a virtual world. Search for "virtual reality" in your cellphone app store and you'll find hundreds of hits, even though a tiny cellphone screen could never get anywhere near producing the convincing experience of VR. Nevertheless, things like interactive games and computer simulations would certainly meet parts of our definition up above, so there's clearly more than one approach to building virtual worlds---and more than one flavor of virtual reality. Here are a few of the bigger variations:

[Fully immersive

[For the complete VR experience, we need three things. First, a plausible, and richly detailed virtual world to explore; a computer model or simulation, in other words. Second, a powerful computer that can detect what we're going and adjust our experience accordingly, in real time (so what we see or hear changes as fast as we move---just like in real reality). Third, hardware linked to the computer that fully immerses us in the virtual world as we roam around. Usually, we'd need to put on what's called a head-mounted display (HMD) with two screens and stereo sound, and wear one or more sensory gloves. Alternatively, we could move around inside a room, fitted out with surround-sound loudspeakers, onto which changing images are projected from outside. We'll explore VR equipment in more detail in a moment.

[Non-immersive

[A highly realistic flight simulator on a home PC might qualify as nonimmersive virtual reality, especially if it uses a very wide screen, with headphones or surround sound, and a realistic joystick and other controls. Not everyone wants or needs to be fully immersed in an alternative reality. An architect might build a detailed 3D model of a new building to show to clients that can be explored on a desktop computer by moving a mouse. Most people would classify that as a kind of virtual reality, even if it doesn't fully immerse you. In the same way, computer archaeologists often create engaging 3D reconstructions of long-lost settlements that you can move around and explore. They don't take you back hundreds or thousands of years or create the sounds, smells, and tastes of prehistory, but they give a much richer experience than a few pastel drawings or even an animated movie.

[Collaborative

[What about "virtual world" games like Second Life and Minecraft? Do they count as virtual reality? Although they meet the first four of our criteria (believable, interactive, computer-created and explorable), they don't really meet the fifth: they don't fully immerse you. But one thing they do offer that cutting-edge VR typically doesn't is collaboration: the idea of sharing an experience in a virtual world with other people, often in real time or something very close to it. Collaboration and sharing are likely to become increasingly important features of VR in future.

[Web-based

[Virtual reality was one of the hottest, fastest-growing technologies in the late 1980s and early 1990s, but the rapid rise of the World Wide Web largely killed off interest after that. Even though computer scientists developed a way of building virtual worlds on the Web (using a technology analogous to HTML called Virtual Reality Markup Language, VRML), ordinary people were much more interested in the way the Web gave them new ways to access real reality---new ways to find and publish information, shop, and share thoughts, ideas, and experiences with friends through social media. With Facebook's growing interest in technology, the future of VR seems likely to be both Web-based and collaborative."

[

[AR is actually a sub-product of VR where through a screen you are trying to place an object in the world while in VR you are trying to place yourself in the screen.

[

[Pre Requisites

[At the end of the day, VR is a very demanding process as it requires sometimes really strong hardware. Hence initially it was only used for simulations for teaching and growing industries. Now due to more optimization and increasing use of better technology, we can even use it on our mobile devices the games that can be made can be fun and interactive.

[Prospect and Scale

[

[Hack and Slash linear game.

[What It is?

[It's a Genre of games in which you basically hack and slash your way through AI and win. The idea of these games have always existed so we will look into my most favourite ones during my research

[Pre Requisites

[The pre-requisite in this one is simple I need an engine like unity and make it work. It is now the technology is not that hard and can be well done and polished.

[

[Ideation

[Town Of Salem 3D

[About Town Of Salem

["Town of Salem is a browser-based game that challenges players on their ability to convincingly lie as well as detect when other players are lying. The game ranges from 7 to 15 players. These players are randomly divided into alignments -- Town, Mafia, Serial Killers, Arsonists and Neutrals. If you are a Town member (the good guys) you must track down the Mafia and other villains before they kill you. The catch? You don't know who is a Town member and who is a villain. If you are an evil role, such as a Serial Killer, you secretly murder town members in the veil of night and try to avoid getting caught."5[

[

[So basically a card game with an attitude of deception.

[Why in 3D?

[Basically I believe that sometimes a card game can be easily be transformed to be more intersting. The idea is to get the people playing to convince others that you are not the serial killer when the last thing you may have done is sneak into someone's house and tried to murder them

[First Draw AR.

[What is a First Draw?

["Fast draw, also known as quick draw, is the ability to quickly draw a pistol and fire it accurately on a target. This skill was made popular by romanticized depictions of gunslingers in the Western genre, which in turn were inspired by famous historical gunfights in the American Old West."6[

[

[So this is something a lot of people played as a kid and growing up. Sometimes using finger guns which never allowed a clear winner as it was all based on a general agreement between 2 player.

[

[The game was as in the old west people would have their gun in holstered and then walk 10 steps away from each other. Then look at each other and based on who took their gun out first and was able to shoot the other person would win causing the other person's death.

[How will it work in AR?

[This will require me to use the 3 sensors of the phone the sensor "The gyroscope" the distance calculator and the camera.

[

  1. [The phone will use the gyroscope and the sensor to detect when the

    phone is in the pocket.

  2. [There will probably be an AR target on the player's shirt or

    something similar.

  3. [When the game starts the one who shot first will win. Based on the

    camera and tap.

  4. [This will also require a multiplayer connection using Bluetooth and

    or a network.

[Magic Mindset

[Basic Idea and rules a VR game that can be basically a magic throwing to destroy enemies

[

[Finalised Game: AR

[Why deciding AR?

[Basically, I wanted to work with new technology. So AR seemed like a good idea as it can work with most phones and can be something new to work with. So i decided it was a good thing to get started with.

[

[

[Beginning.

[So initially I wanted to try the simple AR projects to see how it works. So we need to first make an AR camera and have it run . So the first things to do to

{width="6.270833333333333in" height="3.5277777777777777in"}[

[

[First we required to register as a developer and then we could simple open a project in unity as a 3d project

[And load the Vuforia packages

[

{width="6.270833333333333in" height="3.5277777777777777in"}[

[Add a AR camera and also add the licence to the game.

[Then we load up a simple Fish animation from an example package and also remove the TVOS from the player settings

[

[And Vola! we are ready.

[

[We put the AR camera settings to track the rotation rather than position so basically now then we export

{width="1.7708333333333333in" height="3.53125in"}{width="1.8333333333333333in" height="3.53125in"}{width="1.78125in" height="3.53125in"}[

[We can now look around at fishes on our AR camera.

[This is a pretty good start but now we need to be able to track things in AR to be efficient so we need to try a little bit of image tracking.

[Image Tracking

[Setup :-

[This was slightly tricky. Cause i needed to first know the exact dimensions of something and have it around. Luckily i had a book lying around that could be a good. First i needed to register it as a database on the developer website

[

{width="6.270833333333333in" height="3.5277777777777777in"}{width="6.270833333333333in" height="3.5277777777777777in"}[

[

[Basically it will create a data set file that can be used by unity as a target and the image has to be defined in meters.

[

{width="6.270833333333333in" height="3.5277777777777777in"}[

[

[Basically in the hierarchy we define an image target and on that target we can place whatever and it can be used to add anything on top of it. This was something that made it easy powerful but for billboard perspoises powerful.

[

[We needed to find a way to have some targets on randomly and i was still not sure how to track them.

[

[So we got introduced to user defined targets in one of the example assets from the vuforia asset store.

[

[User Defined Target

[Now we can use basically user defined targets that can hopefully put in multiple targets and game objects in this can be understood by using the example assets from the asset store.

[

[ {width="6.270833333333333in" height="3.5277777777777777in"}[

[

[The core samples lets us mess around with a lot of thing but taking that some limitations came about because of support of phones. Some features won't work.

[

[Understanding the code:

[The way Vuforia uses user defined targets is the same as predefined image targets. The only difference is one is happening during runtime and is highly inaccurate compared to the other which was really evident while testing it out.

[

[But they way it has to work is simple. Yo basically create a user defined target builder that can be built on runtime

{width="6.270833333333333in" height="3.5277777777777777in"}[

[

[And can be run over time.

[And place the object that you want it to spawn on the user defined target in the hierarchy and we need to test the quality of the target (the more edges on the target the better.)

[

[Which can be easily be

[


[switch (quality)
{
case (Vuforia.ImageTargetBuilder.FrameQuality.FRAME_QUALITY_NONE):
SetMeter(Color.gray, Color.gray, Color.gray);
break;
case (Vuforia.ImageTargetBuilder.FrameQuality.FRAME_QUALITY_LOW):
SetMeter(Color.red, Color.gray, Color.gray);
break;
case (Vuforia.ImageTargetBuilder.FrameQuality.FRAME_QUALITY_MEDIUM):
SetMeter(Color.red, Color.yellow, Color.gray);
break;
case (Vuforia.ImageTargetBuilder.FrameQuality.FRAME_QUALITY_HIGH):
SetMeter(Color.red, Color.yellow, Color.green);
break;
}


[

[After the quality is good enough it can actually try and build a target.

[Which then is sent to build the target here


[public void BuildNewTarget()
{
if (m_FrameQuality == ImageTargetBuilder.FrameQuality.FRAME_QUALITY_MEDIUM ||
m_FrameQuality == ImageTargetBuilder.FrameQuality.FRAME_QUALITY_HIGH)
{
// create the name of the next target.
// the TrackableName of the original, linked ImageTargetBehaviour is extended with a continuous number to ensure unique names
string targetName = string.Format("{0}-{1}", ImageTargetTemplate.TrackableName, m_TargetCounter);

// generate a new target:
m_TargetBuildingBehaviour.BuildNewTarget(targetName, ImageTargetTemplate.GetSize().x);
}
else
{
Debug.Log("Cannot build new target, due to poor camera image quality");
if (m_QualityDialog)
{
StopAllCoroutines();
m_QualityDialog.GetComponent<CanvasGroup>().alpha = 1;
StartCoroutine(FadeOutQualityDialog());
}
}
}


[

[The problem is it all happens in the background. You cannot really have too much of the inner control as well but till it works smoothly it works as shown down below.

[

{width="1.78125in" height="3.53125in"}{width="1.7916666666666667in" height="3.53125in"}{width="1.7604166666666667in" height="3.53125in"}[

[

[

[

[This still does not help as we need to place targets randomly and it needs to be able to recognise the ground plain.

[

[Which as i found out due to the lack or resources a lot of android phones do not support it which is really not fun.

[

[Also the user defined target also need the edges like target system to calculate the already existing targets and further off non existing can make it difficult

[

[

[So now i need to work on versions of it.

[

[Monster Eater

[AR target shooter

[Now like earlier we do a simple import of the Vuforia and other assets and set up the AR camera in the scene. The first version of the game is supposed to be a simple shoot the target so i imported 3 main assets.

[

{width="6.270833333333333in" height="2.888888888888889in"}{width="6.270833333333333in" height="2.9444444444444446in"}{width="6.270833333333333in" height="3.0416666666666665in"}[

[Models are simple there and from 7[

[Now for setting up the code.

[

[Simple bullet fire.


[using System.Collections.Generic;
using UnityEngine;

public class LaunchSourceBehivior : MonoBehaviour
{
public float velocity;
public Transform bulletsHolder;
public GameObject bulletPrefab;
public Transform barrel;
public float fireRate;
public float nextfire;

public void Fire()
{
if (Time.time > nextfire)
{
nextfire = Time.time + fireRate;

GameObject bullet = (GameObject)Instantiate(bulletPrefab, barrel.position, Quaternion.identity, bulletsHolder);

bullet.GetComponent<Rigidbody>().velocity = bullet.transform.forward * velocity;
}
}
}


[

[


[using System.Collections.Generic;
using UnityEngine;

public class TargetHitScript : MonoBehaviour
{
Transform Player;

private void Start()
{
Player = GameObject.FindWithTag("Player").transform;
}
// Start is called before the first frame update
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Bullet")
{
other.gameObject.SetActive(false);
transform.position = Random.insideUnitSphere * 5;
transform.LookAt(Player);
}
}
}


[ Working on a better version


[using System.Collections.Generic;
using UnityEngine;

public class TargetRandomizer : MonoBehaviour
{

public Transform Player;
public GameObject[] targets;

// Start is called before the first frame update
void Start()
{
targets = GameObject.FindGameObjectsWithTag("Target");
for (int i = 0; i < targets.Length; i++)
{
targets[i] = AssignTargetPosition(targets[i]);
}
}


public Vector3 retRandLocation()
{
return Random.insideUnitSphere * 5;
}

public GameObject AssignTargetPosition(GameObject target)
{
target.transform.position = retRandLocation();
target.transform.LookAt(Player);
return target;
}
}


[

[

[Then working on the UI


[using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ScoreScript : MonoBehaviour
{
public static int score;
public Text scoreText;

private void Start()
{
score = 0;
}

private void Update()
{
scoreText.text = "Score = "+ score;
}
}


[

[


[using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CountDownTimer : MonoBehaviour
{

[SerializeField]
private Text uitimer;
[SerializeField]
private float mainTimer;
float timer;
public bool canCount = true;
public bool doOnce = false;
public bool hasGameStarted = false;
// Start is called before the first frame update
void Start()
{
timer = mainTimer;
}

// Update is called once per frame
void Update()
{
if (hasGameStarted)
{
if (timer >= 0.0f && canCount)
{
timer -= Time.deltaTime;
uitimer.text = timer.ToString("F");

}
else if (timer <= 0.0f && !doOnce)
{
canCount = false;
doOnce = true;
uitimer.text = "0.00";
timer = 0.0f;
}
}
}

public void ResetButton()
{
timer = mainTimer;
canCount = true;
doOnce = false;
}

public void SetHasGameStarted(bool check)
{
hasGameStarted = check;
}
}


[

[

[

[Changes to Target hit script

[


[ public void addScore(float distance)
{
if (distance < highScoreDistance)
{
//Add the highest score bulls eye score.
ScoreScript.score += 5;
}
else if (distance > highScoreDistance && distance < medScoreDistance)
{
//Add medium score.
ScoreScript.score += 2;
}
else
{
//Add lowest score.
ScoreScript.score += 1;
}
Debug.Log(ScoreScript.score);
}


[


[ public float highScoreDistance, medScoreDistance, longScoreDistance;

private void OnDrawGizmos()
{
Gizmos.color = Color.red;
Gizmos.DrawLine(transform.position, new Vector3(transform.position.x + highScoreDistance, transform.position.y + highScoreDistance, transform.position.z));
}{width="4.125in" height="3.40625in"}[


[

[The Result

{width="0.927334864391951in" height="1.8385422134733158in"}{width="1.7395833333333333in" height="3.53125in"}{width="1.6666666666666667in" height="3.53125in"}{width="1.75in" height="3.53125in"}{width="1.7708333333333333in" height="3.53125in"}[

[

[This is fun but it needs a better concept.

[

[Working on better things.

{width="6.270833333333333in" height="4.0in"}8[

[

{width="4.807292213473316in" height="3.0584601924759407in"}9[

[

[


[public class MonsterController : MonoBehaviour
{
public Transform destination;
public float speed = 0.6f;
public float stoppoingDistance = 1.0f;
private Vector3 velocity = Vector3.zero;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{
MoveMosterWithCam();
}

private void MoveMosterWithCam()
{
if (Vector3.Distance(transform.position, destination.transform.position) > stoppoingDistance)
{
Vector3 dir = destination.transform.position-transform.position;
dir = dir.normalized;
transform.LookAt(dir);
transform.position = Vector3.SmoothDamp(transform.position, destination.transform.position, ref velocity, speed);
}
else
{
transform.LookAt(Camera.main.transform);
}
}
}


[

[

[

[


[using System.Collections.Generic;
using UnityEngine;

public class CheckTrigger : MonoBehaviour
{
public bool isEaten = false;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Player")
{
isEaten = true;
}
}
}


[

[Updated Randomiser


[ public Vector3 retRandLocation()
{
return Random.insideUnitSphere * 10;
float angleX = Random.Range(maxMinAroundX.x, maxMinAroundX.y);
float angleY = Random.Range(maxMinAroundY.x, maxMinAroundY.y);
Vector3 pointOnSphere = new Vector3();
pointOnSphere.x = Player.transform.position.x + radius * Mathf.Cos(angleY) * Mathf.Cos(angleX);
pointOnSphere.y = Player.transform.position.y + radius * Mathf.Sin(angleX);
pointOnSphere.z = Player.transform.position.z + radius * Mathf.Sin(angleY) * Mathf.Cos(angleX);
return pointOnSphere;

}


[

[


[ private void Update()
{
for (int i = 0; i < dictonaryInSceanFood.Count; i++)
{
if(dictonaryInSceanFood[i].GetComponent<CheckTrigger>().isEaten == true)
{
Destroy(dictonaryInSceanFood[i]);
dictonaryInSceanFood[i] = InstantiateFood();
ScoreScript.score++;
}

}
}


[

[

[Public variables


[ public GameObject[] foodPrefabs;
public int maxFoodInScean = 5;
public Transform destination;
public Vector2 maxMinAroundX = new Vector2(-45f, 45f);
public Vector2 maxMinAroundY = new Vector2(0, 360f);
float radius;
Dictionary<int, GameObject> dictonaryInSceanFood = new Dictionary<int, GameObject>();


[


[ public GameObject InstantiateFood()
{
int index = Random.Range(0, foodPrefabs.Length);
GameObject food = Instantiate(foodPrefabs[index], retRandLocation(), transform.rotation, transform) as GameObject;
food.transform.LookAt(Player.transform);
return food;
}


[

[Updated countdown timer


[ public bool hasGameStarted = false;
public GameObject disableMainGame;
public GameObject displayTotalScore;
public GameObject scoreScript;


[

[Animation control.


[public enum MonsterState
{
idel,isEating
};


[

[Monster controller update

[


[ public MonsterState monsterState = MonsterState.idel;
Animation animation;


[


[switch (monsterState)
{
case MonsterState.idel:
MoveMosterWithCam();
if (!animation.IsPlaying("Anim_Idle"))
{
animation.Play("Anim_Idle");
}
break;
case MonsterState.isEating:
if (animation.IsPlaying("Anim_Attack"))
{
if (animation["Anim_Attack"].normalizedTime > 0.8f)
{

monsterState = MonsterState.idel;
}
}
else
{
animation.Play("Anim_Attack");
}
break;
default:
Debug.Log("monster state switch case error");
break;
}


[


[ public void Restart()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}


{width="6.270833333333333in" height="2.888888888888889in"}[

[

{width="5.802083333333333in" height="2.3020833333333335in"}[

[

[Target Randomizer update


[+[System.Serializable]
public struct FoodTypeManager
{
public GameObject foodPrefab;
public int score;
public bool isEdible;

public FoodTypeManager(GameObject prefab, int Score , bool isPositive )
{
foodPrefab = prefab;
score = Score;
isEdible = isPositive;
}
}


[


[public FoodTypeManager[] foodTypeManager;

Dictionary<int, FoodTypeManager> dictonaryInSceanFood = new Dictionary<int, FoodTypeManager>();
public Canvas canvasPrefab;


[

[


[void Start()
{

{
for (int i = 0; i < dictonaryInSceanFood.Count; i++)
{

if(dictonaryInSceanFood[i].foodPrefab.GetComponent<CheckTrigger>().isEaten == true)
{
Destroy(dictonaryInSceanFood[i].foodPrefab);
InstantiateCanvasScore(dictonaryInSceanFood[i].score,dictonaryInSceanFood[i].foodPrefab.transform);
dictonaryInSceanFood[i] = InstantiateFood();
ScoreScript.score++;
}

}
}


[


[ private void InstantiateCanvasScore(int score, Transform transfrom)
{
Canvas scorePopUp = Instantiate(canvasPrefab, transfrom.position, transform.rotation) as Canvas;
if (score < 0)
{
scorePopUp.GetComponentInChildren<Text>().color = Color.red;
scorePopUp.GetComponentInChildren<Text>().text = "" + score.ToString();

}
else
{
scorePopUp.GetComponentInChildren<Text>().color = Color.green;
scorePopUp.GetComponentInChildren<Text>().text = "+" + score.ToString();
}
ScoreScript.score += score;
Destroy(scorePopUp.gameObject,2f);
}


[


[ public FoodTypeManager InstantiateFood()
{
int index = Random.Range(0, foodTypeManager.Length);
GameObject food = Instantiate(foodTypeManager[index].foodPrefab, retRandLocation(), transform.rotation, transform) as GameObject;
food.transform.LookAt(Player.transform);
FoodTypeManager foodDictAdd = new FoodTypeManager(food, foodTypeManager[index].score, foodTypeManager[index].isEdible);
return foodDictAdd;
}


[

{width="5.802083333333333in" height="5.729166666666667in"}[

[

[Score clamping


[ if (score < 0) { score = 0; }
scoreText.text = "Score = "+ score.ToString();


[

[

[Final Result

{width="1.486017060367454in" height="2.963542213473316in"}{width="1.8385422134733158in" height="3.638579396325459in"}{width="1.3222594050743657in" height="2.6718755468066493in"}{width="1.4171839457567803in" height="2.8281255468066493in"}{width="2.3770024059492565in" height="4.744792213473316in"}{width="2.369792213473316in" height="4.750404636920385in"}[

Footnotes

  1. AREA. 2019. Augmented Reality Functional Requirements - AREA. [ONLINE] Available at: [http://thearea.org/area-resources/augmented-reality-functional-requirements/]{.underline}. [Accessed 07 February 2019].

  2. Vuforia | AR Features. 2019. Vuforia | AR Features. [ONLINE] Available at: [https://www.vuforia.com/content/vuforia/en/features.html]{.underline}. [Accessed 07 February 2019].

  3. LEGO® NEXO KNIGHTS™:MERLOK 2.0. 2019. LEGO® NEXO KNIGHTS™:MERLOK 2.0. [ONLINE] Available at: [https://www.vuforia.com/content/vuforia/en/case-studies/lego-nexo-knights.html]{.underline}. [Accessed 07 February 2019]

  4. Explain that Stuff. 2019. What is virtual reality? - A simple introduction. [ONLINE] Available at: [https://www.explainthatstuff.com/virtualreality.html]{.underline}. [Accessed 07 February 2019].

  5. . 2019. BlankMediaGames | Town of Salem. [ONLINE] Available at:[https://www.blankmediagames.com/]{.underline}. [Accessed 07 February 2019].

  6. Fast draw - Wikipedia. 2019. Fast draw - Wikipedia. [ONLINE] Available at: [https://en.wikipedia.org/wiki/Fast_draw]{.underline}. [Accessed 07 February 2019].

  7. [ TurboSquid. 2019. 3D Models for Professionals :: TurboSquid. [ONLINE] Available at: [ https://www.turbosquid.com.]{.underline} [Accessed 26 February 2019].

  8. Unity Asset Store. 2019. Stone Monster - Asset Store. [ONLINE] Available at: [https://assetstore.unity.com/packages/3d/characters/stone-monster-101433]{.underline}. [Accessed 29 May 2019].

  9. Unity Asset Store. 2019. FREE Food Pack - Asset Store. [ONLINE] Available at: [https://assetstore.unity.com/packages/3d/props/food/free-food-pack-85884]{.underline}. [Accessed 29 May 2019].

About

Basic AR shooting game based on Gyroscope to make targets appear .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published