- Home /
Monster doesn't move
I'm very sorry that I have to ask this, but I've been trying & looking up answers for about the past 5 hours now on something so simple... I have a spider that has to chase my player, without using Translate cause the map has depths and walls. I have this code
Debug.DrawLine (target.transform.position, myTransform.position);
//Look at target
myTransform.rotation = Quaternion.Slerp (myTransform.rotation,Quaternion.LookRotation(target.position-myTransform.position),rotationSpeed*Time.deltaTime); //move towards target
//myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
//Vector3 direction = transform.rotation * new Vector3( 1 , 0, 0);
//Vector3 dist = direction * moveSpeed * Time.deltaTime;
myTransform.TransformDirection (Vector3.forward);
cc.SimpleMove (myTransform.forward*moveSpeed);
and I've also tried some other ways of translating the vectors, but whatever I do it doesn't move ( it finds the enemy and aims for it though...)
Could it be because it's instantiated by the photonnetwork? I'm at the last of my resort...
could be that your moveSpeed is too $$anonymous$$imal to have any effect, or your agent isn't attached to the navmesh
Your answer
Follow this Question
Related Questions
Moving AI away or towards player not working correctly. 1 Answer
Freelancer of Freespace type Enemy Ai 2 Answers
How To Make Enemy Move Around 0 Answers
Transform.translate change 1 Answer
How To Make Basic AI? 3 Answers