Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by PandrPi · Oct 23, 2017 at 11:05 AM · transformoptimizationdistancecalculations

How to optimize big numbers calculatation. Not exact transform position when I'm moving on a far distance from a zero point

I have a camera with one game object in child of it. When I'm moving near the start point (0,0,0) everything does right, but when I'm on thousand units from start point the child of the camera is wobbling, the furter from the start point the stronger is wobbling. I understand why it is, but i want to know how I can optimize it. Sorry for my english if something is not correct.

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 Cuttlas-U · Oct 23, 2017 at 07:30 PM

hi; can u show me your script ? i dont know what to optimize;

Comment
Add comment · Show 7 · 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 PandrPi · Oct 24, 2017 at 11:29 AM 0
Share

Now i can't, but i am not sure that it will help you, i just add force to my camera's rigidbody Rigidbody rig = camTransform.GetComponent(); rig.AddForce(camTransform.forward * speed); This code is similar to my code, i can't show the original, i am not at home. The problem is not in code here is nothing to optimize, at least i don't see it, but on one thousand units from the start point i have already seen the wobbling.

avatar image Cuttlas-U PandrPi · Oct 25, 2017 at 06:21 AM 0
Share

hi; sorry for late response; did u try Freezing the rotaition of rigidbody ?

avatar image PandrPi Cuttlas-U · Oct 25, 2017 at 10:59 AM 0
Share

Frezeeng is turned on, but it don't give any effect.

avatar image PandrPi · Oct 25, 2017 at 11:08 AM 0
Share

I can not understand why it is so hard for cpu to caldulate not so long number as several thousand with good accuracy.Every of values of my cam position is rarely bigger than several thousand units. The furter is camera the bigger is x,y and z values, so may be some method to save accuracy in big number.

avatar image Cuttlas-U PandrPi · Oct 25, 2017 at 11:21 AM 0
Share

i never had problems like this ! so maybe u can describe better with some screen shots ?

avatar image PandrPi Cuttlas-U · Oct 25, 2017 at 11:26 AM 0
Share

Only on weekends

Show more comments

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

141 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 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

Calculate time to destination taking account current speed, also how to determine distance between two objects? 1 Answer

need help spawning objects with specific cordinates 1 Answer

Why won’t my distanceTraveled work? 0 Answers

Don't trust "Vector3.Distance"? 1 Answer

Optimizing distance between surfaces calculations 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