• 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
Question by IgorUnity3D · Aug 22, 2017 at 03:47 AM · camera2d gamesmoothfollow

Camera Smooth - Player moves little bit back when jump

Hello,

I'm facing a problem when I'm using smoothing on my camera.

When my character jumps, he seems to come back a little before performing the jump animation. I have already checked the animations and they all seem to be right, besides having tried various soft scripts. In addition to trying to change the method of update (Update, FixedUpdate & LateUpdate).

Everything seems to work that I leave the smoothing value down.

 void FixedUpdate()
     {
 
         // if the is following option is activated.
         if (isFollowing)
         {
             var velocityX = velocity.x * Time.deltaTime;
             var velocityY = velocity.y * Time.deltaTime;
 
             float posX = Mathf.SmoothDamp(transform.position.x, player.transform.position.x + XOffset, ref velocityX, smoothTimeX);
             float posY = Mathf.SmoothDamp(transform.position.y, player.transform.position.y + YOffset, ref velocityY, smoothTimeY);
             transform.position = new Vector3(posX, posY, transform.position.z);
 
         }
         // Set the camera bounds.
         if (bounds)
         {
             transform.position = new Vector3(Mathf.Clamp(transform.position.x, minCamPos.x, maxCamPos.x),
                                               Mathf.Clamp(transform.position.y, minCamPos.y, maxCamPos.y),
                                               Mathf.Clamp(transform.position.z, minCamPos.z, maxCamPos.z));
 
         }
 
     }

Please see the video below:

See here!

What could be happening?

Any help is welcome!

Comment

People who like this

0 Show 0
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

Answer by adipatil3517 · Aug 22, 2017 at 05:33 AM

sorry friend i didnt understand your problem could you please elaborate it so that i can understand

Comment

People who like this

0 Show 2 · 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 IgorUnity3D · Aug 22, 2017 at 03:09 PM 0
Share

Hey... See the video please... my player moves little bit back when jump when apply smooth on camera.

avatar image adipatil3517 IgorUnity3D · Aug 26, 2017 at 07:52 AM 0
Share

Hey, sorry for delay but i don't see any problem may be the thing is when you move camera it take players position and then when you switch position of player the camera first reach previous position then it again take new position to move. i think that satisfy your query

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

109 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image 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

i need help about players hands positions in 2D multiplayer card game 0 Answers

Set the default 6d shake noise profile by script in Cinemachine? 0 Answers

Smooth Follow Camera that Keeps Up 0 Answers

Ideas for getting SmoothFollow camera to follow right behind? 0 Answers

Smooth Camera follow script is causing framerate drops when moving 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