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 Setzer · Mar 30, 2011 at 09:29 PM · movementoptimizationframeratecontrol

Movement cutting frames in half?

I'm experiencing some bizarre and massive frame loss when moving my character. The weird thing is, this frame loss only occurs when the character is moving either forward or backward. My first thought was that the animation for walking was more intense than the animation for turning, so I changed them both to be the same. Frame rate is still getting cut in half. I thought it might have to do with the camera following the character and having to draw new terrain and objects. However, rotation still causes new objects to be drawn, and the frame loss is normal when rotating. Additionally, I created multiple versions of my character prefab in the scene, but only attached the camera to one of them. They all respond to the input the same way, and this causes frame rate to be cut in half for each character copy, down to a ridiculously low number considering I've only got about 10 low poly objects in my scene.

Our movement code is a carbon copy of the 3rd Person Controller script, except with all the jumping mechanics removed.

We use the Input.GetAxis() function to recieve movement input. It only experiences massive frame loss when Input.GetAxis("Vertical") is receiving information. This leads me to my final conclusion. The W and S keys are computationally more expensive than other keys. Lol, this is not a satisfactory conclusion.

Anyone have a better idea of what's going on?

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 Setzer · Apr 04, 2011 at 10:40 PM 0
Share

Turns out the framerate loss was due to the constant collision checking with the terrain, which was comprised of WAY too many Tri's. We replaced the terrain with a two-tri plane and the problem was resolved.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Velketor · Mar 30, 2011 at 10:46 PM

try bringing your frame-rate-consuming character into a different Unity scene and see if it happens still. that will help you troubleshoot the issue.

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

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

No one has followed this question yet.

Related Questions

How to make camera position relative to a specific target. 1 Answer

Can we control a character's joints? 1 Answer

Accurate Frames Per Second Count 5 Answers

Bad fps on blank project android,Very bad fps on completely blank project (mobile) 0 Answers

Is FPS independency possible when testing in the editor?? 0 Answers


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