#Floating Precision Point

1 messages · Page 1 of 1 (latest)

unreal osprey
#
  • Introduction
    Hello experts. As we know, the camera's rendering becomes stunning after going a certain distance from the world origin. This can be prevented with some origin changing methods that keeps the player at World Origin such as Deffered Floating Origin Shift or using a pipeline tool like HDRP's Camera Relative Processing, although I haven't tested it.

  • Description
    I am trying to create an open-world mobile game with URP and to fix the floating precision, i am going to use a method called "Continuous Floating Origin"
    Currently using a Player GameObject with Rigidbody. Player's Rigidbody uses gravity and non-kinematic.
    For this method, we use a parent GameObject of whole world named "WorldRoot". WorldRoot also has a Rigidbody that is kinematic.
    Player is not a child of WorldRoot.

  • Attempts i tried before asking to you:
    https://gist.github.com/YunusYld/191af288c57177ecc9357a1d57a9e288
    You can start observing from the Player class.

  • Question
    How can i achieve a truly moving World with RigidBodies that is not affected by World Motion at the top of the world but can be affected by the Player or other things freely without any limitation(Joints...) to the movement of Rigidbody?

  • Solution
    Update! Sorry, i really apologize for not testing my attempt properly before asking to you. I just realized when the Player has a proper Collision Detection Mode, the system works perfectly! I choose the Continuous Speculative since i want the angular velocity to be count in while detecting the collisions. But still, Mr. MartinTilo's method good for future systems likely for the dynamic instantiation of assets and memory allocation i say. I would mix with it and see what i will get!

jolly trellis
#

Hi Wilhelm,
We happen to have a Unite talk that starts at 3 pm CET, held by a colleague. If you are physically at Unite, you could check that out directly. Otherwise I'll wait until after then as I currently can't get in contact with said colleague to get enough details to answer your question right now 🙂

unreal osprey
#

No problem! I will be waiting on.

unreal osprey
#

Any news on that? @jolly trellis

unreal osprey
jolly trellis
#

She's traveling back from Unite ATM but I've put a reminder in to get back to you about this on Monday

jolly trellis
#

So, I'm still going over the slides but first things first:
You might want to be watching out for the recording of the Talk "Lifelike actions and reactions - adding physics to your game" by Vera Mommersteeg and Nicolas Borromeo to come online on Unity's Youtube channel (https://www.youtube.com/playlist?list=PLX2vGYjWbI0Te8f4AocWQOdzSfh_wWOI- for the playlist where it will eventually drop). It's full of relevant details and my summary for your case here is unlikely to do it justice.

#

Next up, you'll probably be best served by chunking up your world into streamed sections. Whenever the player reaches the boundaries, of the central chunk, you'd be moving the chunks over so the player is closer to the origin again

#

For moving that many objects, you'll want to be looking at using Transform Jobs. This means that for every chunk you will have to manage these arrays of transforms yourself and likely will have to convert them from managed arrays to Transform Access Arrays before executing such operations.

#

In the Project Settings window under the Physics category we can find a checkbox for “Auto Sync Transforms”, having this checkbox enabled simply means that when we modify the transform of a GameObject that has a Rigidbody or Collider component on it we will attempt to write all transform changes to the physics scene. This operation will happen for any subsequent changes to such transforms. We recommend disabling this checkbox as it will ensure that we only write transform changes to the physics scene right before we simulate.

#

You should try to avoid deep hierarchies as they are harder for the transform dispatch system to split into jobs

#

If there are performance issues with simulating such a big world, you may want to reduce the performance overhead through use the batch queries API, like RaycastCommand.ScheduleBatch

jolly trellis
#

@unreal osprey FYI: That talk is finally live on YouTube, see here https://youtu.be/lByTnRq7xnY?feature=shared

From advanced 3D open worlds to the smallest 2D title, all games need physics to give them weight. In this video, Nicolas Borromeo and Vera Mommersteeg dive into Unity’s physics solutions for common use cases as well as challenges such as ghost collisions, tunneling, and unexpected bounces. You learn more about choosing and using NVIDIA PhysX, U...

▶ Play video