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 DevMerlin · Nov 10, 2012 at 06:47 AM · cameraitweenfixedupdate

Why is my camera sticking and showing lag while using iTween to follow a rigidbody-actor?

I have a little sidescrolling camera powered by iTween, very simple in it's scripting - however I've noticed that once I actually start my character, the camera "sticks" in place for five-ten seconds before snapping to and following the character. The character is being moved through physics with a velocity-powered launch.

 using UnityEngine;
 using System.Collections;
 
 public class CameraFollow : MonoBehaviour {
     
     public Transform target;
 
 
     // Update is called once per frame
     void FixedUpdate () {
         float cowX = target.position.x + 2;
         float cameraZ = transform.position.z;
         float cowY = target.position.y;
         
         Vector3 move = new Vector3(cowX, cowY, cameraZ);
         
         
         
         iTween.MoveUpdate(gameObject, move, 0.0f);    
     }
 }
 
Comment
Add comment · Show 2
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 axCed · Oct 10, 2013 at 01:52 PM 0
Share

I know it is an old post, but I'm currently working with our camera movement and we also have lag issue.

So, I found your question. If you don't have an answer, maybe you can delete it, but if you did find a solution, could you answer your question, please?

avatar image robertbu · Oct 10, 2013 at 03:04 PM 0
Share

@axCed - I don't know about this specific question, but often jitter and lag problems with cameras can be solved by moving code into LateUpdate() ins$$anonymous$$d of Update() or FixedUpdate(). Also it seems a bit strange to have this non-physics code in FixedUpdate(). It is possible the different in frame rate between FixedUpdate() and Update() might cause some sort of issue. Consider opening a new question with sample code that demonstrates your issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by duongquangnam · Dec 18, 2016 at 02:50 PM

Try replace FixedUpdate to Update. I think it will work

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

11 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

Related Questions

Camera shaking and parent movement 1 Answer

How to restrict rotation properly 2 Answers

Jitter Camera Effect When Parented To Animated Object 2 Answers

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

Jittery thid-person camera follow behaviour 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