Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by horrorgamer1337 · Nov 26, 2012 at 07:36 AM · enemyfollow

How to make an enemy stalk you

Hi, Im redoing my game because I upgraded to unity 4.0 and it deleted all of my scripts from the last game. Right now Im trying to get a script that makes the enemy always look at you and and follows more persistently as each page is collected. If someone could give me a script for this Id really appreciate it. Thanks.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image flaviusxvii · Nov 28, 2012 at 01:25 AM 0
Share

I can give you a script where the enemy always faces just to the left of you. And follows you really casually, like they could care less you're even alive. But they're sorta waiting for you to get hit by a car, so they can rifle through your pockets while you are helpless and injured.

This sounds scarier really.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Berenger · Nov 26, 2012 at 08:15 AM

Give you a script, yeah, no. But hints and directions !

First, you have to separate how to move your character, then where to move it. For the first part, you can import the character controller package. For the second part, there is the orientation (transform.LookAt) and the direction (target - currPos). But this will move your character on a straight line, and I suspect there is trees in your game. You could do a simple avoidance as trees are kind of particular (circular, limited radius) or, more difficult, pathfinding.

As for the degrees of efficiency to rise up as the player progress into the game, you can play on the speed of the enemy maybe ? Then again, I never played slenderman myself.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image horrorgamer1337 · Nov 28, 2012 at 12:35 AM 0
Share

Umm thank you, I guess...

avatar image Loius · Nov 28, 2012 at 03:11 AM 0
Share

This site is to help you solve your problems - if you want someone to solve your problems for you (which is different), you'll want to look in the Collaboration section of the forums.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Navmesh follow and stop at a distance 2 Answers

Enemy is not stopping following the player 2 Answers

Enemys following and shooting 1 Answer

make enemy attack 0 Answers

AI Following Problem 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges