- Home /
Question by
Michael.H · Oct 27, 2013 at 03:08 PM ·
move an object
Transform.Position stop?
I'm trying to make an enemy that moves towards you when you dont look and when you look it stops moving. How can i make it stop when i look at it?
if(canSee == false){
transform.position += transform.forward*MoveSpeed*Time.deltaTime;
}
else{
//what do i put here?
}
Comment
Best Answer
Answer by cjdev · Oct 27, 2013 at 03:14 PM
It seems like you don't have to put anything there. If you aren't adding to the transform then it will stay the same as it was.
Your answer
![](https://koobas.hobune.stream/wayback/20220613120723im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Move gameobject at constant speed 1 Answer
Rigidbody Not Move 0 Answers
How to move a rigid body when you click on it 1 Answer
Collision detection with pooled objects 0 Answers
Making a gameobject move to a position 2 Answers