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 tgrech · Nov 20, 2011 at 01:27 PM · animationfpsaimodelenemyai

Character Animation won't work with FPS scripts

I have all the modelling and animations done and saved for my particular character for Unity, and I have got it to work just as a looping animated model. So I then tried to see if it worked as an actual enemy. So I took the FPS Robot AI scripts and tried to implement them with my model, didn't work. So next I decided to try to swap the models and animations in the Robot Prefab with the models and animations of mine, So I swapped the roothandle with my model(It's set up in a similar way but all the names of arms, legs, ect are different) and then I swapped the animations in the script with my new animations, carefully making sure they went in the right element(Again the name of the animations aren't the same but does that make a difference?). So I'm wondering what I'm doing wrong? How do I implement the FPS tutorial scripts with my model animation or vice versa correctly, I've been trying and retying this in different ways for a few days and still had no luck so I decided to ask here.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Matteaton83 · Nov 22, 2011 at 10:08 PM

Interesting, I'm approaching the problem from a different angle but I ran into a similar problem. I think the issue is that the robot animation scripts won't work outside of the FPS scene that they are originally in. Here was my process: I opened the FPS tutorial, made a new scene within the same project, put the robot prefab into the scene, set up two empty game objects with the autowaypoint script on them and then a plane for him to walk on. When you play the scene the robot is fixed in the starting position and moves back and forth between the waypoints but does not animate in any way. I wrote a debug structure into the AIAnimation script and it returns true for animation.IsPlaying("run").

So the broadstroke of this tgrech is that the animations won't play even if the robot has it's normal animations and I suspect that there is another script or option that is set in the original FPS scene that is solving this issue, but I can't offer a quick solution to what it is.

A possible workaround for you could be to work in the FPS's Level1 scene and replace the model and animations in there to test them. Good luck.

EDIT: I found my problem. Perhaps it's yours as well. The Time.timescale is set to 0 in the FPS Project Time settings. It gets set to 1 by a script called LockCursor. add this line to the Start method of your AIAnimation script

Time.timeScale = 1;

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 tgrech · Nov 22, 2011 at 10:55 PM 0
Share

I had got the Robot to animate fine with its own animations, the problem was only encountered when using my own. I will try your solution soon though, and I will report back on whether it works. thanks for contributing either way.

avatar image tgrech · Nov 23, 2011 at 04:16 PM 0
Share

It turns out this does seem to get it to start a run animation but nothing else, and no longer moves, though this may be a collision issue I need to sort out on a different matter

avatar image Matteaton83 · Nov 23, 2011 at 04:28 PM 0
Share

The Robot script looks for game objects with the FPS tutorial's autowaypoint script on them to deter$$anonymous$$e where to move to. If you don't have any it may just run on the spot.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to handle FPS arms? 0 Answers

How do you make a enemy AI hear approaching footsteps? 2 Answers

Problem with camera and animations in making a Unity FPS 2 Answers

How do I make an enemy lead his shots? 2 Answers

Walk/run animation moves main camera up and down (first person) 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