Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Object follow player

$
0
0
Hi, I'm stuck in a little problem. I have a code that make a object follow the Player. Now I need this object to ignore any collisions and follow player. And the object will get to the original position it was in after some time.

Here's my code, please help.
Code (JavaScript):
  1. #pragma strict
  2.  
  3. var target : Transform; //the enemy's target
  4. var moveSpeed = 3; //move speed
  5. var rotationSpeed = 3; //speed of turning
  6. var distance = 3; //max distance from object to player
  7. var myTransform : Transform;...
Object follow player

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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