How to check if an object is passed a certain point?
I'm trying to make an object despawn if it gets to a certain point in the world. I'm very new to all of this, but this is what I've tried (which obviously hasn't worked) if (Object < Vector3 (0, 0, -25)) { Destroy (Object); }
I get the error: Assets/_Assets/Scripts/SpawnPerson.cs(25,22): error CS0119: Expression denotes a `type', where a variable, value or method group was expected Which I assume means that I can't put the Vector 3 there. So that's what I'm trying to figure out. What do I put there?
Your answer

Follow this Question
Related Questions
Objects getting destroyed in unity test, but only sometimes in the phone app 0 Answers
Destroy moving objcts through touch on screen 0 Answers
Destroy, deactive or hide 0 Answers
Destroying an object in a matrix 0 Answers
Boundry destroy problem 1 Answer