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
1
Question by Lambastard · Jun 08, 2014 at 06:17 PM · physicsrigidbodyraycastscale

Long-distance physics

Good day.

We're doing a procedural space game with newtonian physics, and scale is beginning to be a problem. Most of you will be aware of how Unity's single-precision coordinate system causes objects to jitter when they're far away from the (0,0,0) position - we encounter that one primarily with compound colliders using a rigidbody, which tend to look completely ridiculous at more than 1000km away from the world centre.

We're now planning to write our own simplified and abstracted physics simulation for faraway objects, but we're still reliant on various Unity features. I would like to know which of them we can still use at those distances, and which simply won't work anymore when you use the on something that's ten million metres away.

Raycasts - can I still rely on them, or will they give me false negatives/positives? Rigidbodies - compound colliders jitter a lot out there, but are their rigidbodies' movements still physically correct? Colliders - does collision detection still work that far out?

Answers to those three as well as general input related to the issue is greatly appreciated.

Comment
Add comment · Show 6
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 Jeff-Kesselman · Jun 08, 2014 at 06:45 PM 0
Share

Scale is arbitrary. There is no difference in Unity between a world where 10 units is a meter and a word where 10 units is a kilometer except for adjusting things like the force of gravity.

Do you really need such dynamic range or can you just adjust your scale?

avatar image Lambastard · Jun 08, 2014 at 06:59 PM 0
Share

Doesn't work, I'm afraid. Floating point precision suffers from distance as much as from scale reduction.

avatar image Jeff-Kesselman · Jun 08, 2014 at 07:04 PM 0
Share

That then would mean the answer to "do you really need such dynamic range" would be yes.

The next question is... why? You would have to have relatively small objects moving incredibly quickly to cover those sorts of distances....

avatar image Lambastard · Jun 08, 2014 at 07:40 PM 0
Share

Small objects moving fast: Bullets as small as 10mm being fired at velocities ranging from 500m/s (short-barrelled conventional guns) to upwards of 3000m/s (railguns/coilguns). Spacecraft and missiles of various sizes with plenty of fuel being able to accelerate until they run dry, with no air resistance to slow them.

And there's bigger, slower stuff too, which just happens at long distances - the game's set on a pretty large scale, with stuff happening in multiple places simultaneously.

avatar image DMGregory · Jun 08, 2014 at 08:19 PM 0
Share

It may be worth checking out how $$anonymous$$erbal Space Program approaches these kinds of issues. Their developer blog has a number of articles about using multiple coordinate spaces to get precision where they need it.

Show more comments

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

23 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

Related Questions

scaling objects with rigidbodies 2 Answers

Best way to shoot physical bullets? 2 Answers

How do I make the bullet Tracer move towards the location of where the bullet hole prefab gets instantiated? 2 Answers

Calculate where an object is going to land 0 Answers

Raycast doesnt detect object in front of rigidbody (player is stuck on wall) 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