Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

if statements based on a gameobjects location?

$
0
0
I am trying to make an if statements on characters locaation. So that if he is in a certain location something will happen to him. However I am running into some errors. So far what I have is this. if (transform.position = new Vector2(-3, 0)){ transform.Translate (Vector2.right * bossSpeed * Time.deltaTime); transform.Translate (Vector2.up * bossSpeed * Time.deltaTime); and I keep getting errors. I searched the forums but noone had a similar problem.

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>