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 Rhithik · Jul 12, 2012 at 04:49 AM · cameraitweenienumeratorstartcoroutinejerky

Jerky camera when using IEnumerator

One last question before I head off to bed.

 if(wallIsMoving || pirateIsMoving) {
   goLookAtTarget();
 } else {
   //StartCoroutine(delayGoToCannon()); Jerky camera if i use this
   goLookAtCannon(); //I don't get a jerky camera with this
 }

 private IEnumerator delayGoToCannon() {
   yield return new WaitForSeconds(3);
   goLookAtCannon();
 }

When I call goLookAtCannon() function, the camera uses iTween to move to the cannon. Simple enough right? But when I use this IEnumerator to delay the function for 3 seconds before moving to the cannon, it looks like I have 3 FPS when it moves to the cannon, although my FPS is perfectly fine. The goLookAtCannon function all it does is call the iTween.MoveTo method and sets some boolean values.

Any ideas why this is happening? Thanks for any help!

Comment
Add comment · Show 4
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 whydoidoit · Jul 12, 2012 at 06:39 AM 0
Share

Odd. Have you tried using Invoke to call the function after 3 seconds, would be interesting to know if that provokes the same effect.

avatar image Rhithik · Jul 12, 2012 at 05:26 PM 0
Share

Ah good idea. I'll give that a shot when I get back to it and I will let you know.

avatar image Bovine · Jul 12, 2012 at 06:10 PM 1
Share

Are you sure you're not calling delayGoToCannon() multiple times?

avatar image Rhithik · Jul 12, 2012 at 08:29 PM 0
Share

Ah yes I am! I forgot to set a boolean value. That sure does fix the problem. Invoking the method fixed it as well. Thanks to both of you guys.

0 Replies

· Add your reply
  • Sort: 

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

6 People are following this question.

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

Related Questions

Why is an object's movement jerky, when the camera is also moving by following a different rigidbody? 3 Answers

Switching Between (many) different iTween Paths (C#) 0 Answers

Brain exploding ... Problem with an internal Coroutine manager 3 Answers

Camera switching with iTween Touch 1 Answer

issue with jerkyness (jittery rendering/movement) every couple of seconds. 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