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 MrrMaddMann · Nov 08, 2012 at 06:47 PM · enemynpchill

Enemy NPC walks through hills

I need help getting the NPC to walk over the hills whilst following the player rather than through the hills. How can I do this?

Comment
Add comment · Show 5
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 Screenhog · Nov 08, 2012 at 07:03 PM 0
Share

How are you moving the NPC? Are you directly changing its transform.position? Does the NPC have a collider/character controller/rigidbody?

avatar image MrrMaddMann · Nov 08, 2012 at 09:38 PM 0
Share

he has a collider, character controller and rigidbody. it still doesnt work

avatar image Screenhog · Nov 08, 2012 at 09:57 PM 0
Share

O$$anonymous$$, but what about my other questions? Are you directly changing its transform.position?

avatar image MrrMaddMann · Nov 09, 2012 at 07:15 AM 0
Share

I think so. Sorry, I'm a bit new to scripting and found one on this site which does it. But can't link it because I can't remember what it was. Sorry

avatar image Screenhog · Nov 09, 2012 at 03:57 PM 0
Share

If you directly move a transform.position, it completely ignores your collider and rigidbody. This is probably what's happening to you. The simplest way to make it work is to give your enemies CharacterControllers and use CharacterController.Simple$$anonymous$$ove or .$$anonymous$$ove.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Stormizin · Nov 08, 2012 at 09:44 PM

You need to add a collider in the character to colide with the terrain and go up to your hill.

Comment
Add comment · Show 3 · 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 MrrMaddMann · Nov 09, 2012 at 07:13 AM 0
Share

I've already got a collider. that doesn't work

avatar image AlucardJay · Nov 09, 2012 at 07:22 AM 0
Share

I hit this problem, but a search found this : http://forum.unity3d.com/threads/21710-Colliders-not-colliding-with-the-terrain

Check my answer here : http://answers.unity3d.com/questions/327124/player-wont-collide-with-wall.html

Add a rigidbody =]

avatar image MrrMaddMann · Nov 09, 2012 at 07:31 AM 0
Share

I also already added a rigid body. Still doesn't work, but I'll check the links

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

12 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

Related Questions

Multiple Cars not working 1 Answer

Enemy AI help 1 Answer

How to add new animations to enemy NPCs through mecanim? 0 Answers

Enemies not shooting laser on certain level 1 Answer

I made a better shader how do i fix[add _Shadow Strength]help???>Sorry that im asking for to much 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