Jump to content

Recommended Posts

Posted

Hello! I'm trying to use Pegasus in a very large world. I have implemented a floating-origin system that takes care of the floating point issue Unity is prone to. In tandem with this floating point system, I must of course move POIs (and therefore the route) so that the user does not notice the effect.

I discovered the PegasusPoi.UpdateSegemnt() method, which I use after adjusting the transform of the POI object. At first I tried doing this call in a regular function, but that caused my app to freeze for about 7 seconds or so while each POI segment was updated within a single frame. I then tried to do one segment per frame by throwing the UpdateSegment() call loop inside a Coroutine that yielded after each POI. This of course helped, but each POI's call to UpdateSegment() takes so long that the application freezes for at least a couple of seconds before the next iteration/frame.

I have included screenshots of the profiler below that show the performance drop. The spike is the time that the coroutine with UpdateSegment() is looping through the PegasusManager's POI list.

I have 15 POIs in this route

image.png.9e5f790e654c257ea8dcc9945d214791.png

Note that I intend to drive multiple entities via PegasusManagers, so the fact that I am experiencing such performance loss with just one of these routes is... foreboding. All routes will need to be translated when adjusting the floating origin.

I'd like to know if there is a more performant way of translating a Pegasus route? For instance, is there a better method I can call, or a different implementation I should be employing? Calls to some kind of Update method seem necessary as simply altering the Transform of the POIs or the PegasusManager do not recalculate the spline, but this one is very slow for some reason.

 

Thank you!!

-ERS

image.png.b5b9c45bb650c501322f05ef095b9006.png

image.thumb.png.ba82d1011e18a9ded8628cd7f93de8e2.pngimage.thumb.png.a3153ad9f27570028310579aff3deb80.png

image.png

  • Solution
Posted

We will have to investigate this issue. 
Your distance covered is pretty far from the looks of it. 
To negate this in the meantime could you please try to make multiple pegasus paths and then use the Unity recorder/timeline to put them together?

  • 2 weeks later...
Posted
On 3/4/2024 at 2:19 PM, Bryan said:

We will have to investigate this issue. 
Your distance covered is pretty far from the looks of it. 
To negate this in the meantime could you please try to make multiple pegasus paths and then use the Unity recorder/timeline to put them together?

Yes it was a very large distance for sure. A fix I have implemented at this time is to scale the world down to 1uu = 1km (was 1uu = 1m) which has removed my need for floating-origin-type solutions at this time. Your suggestion sounds like it also would have worked, so thank you for that!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • STORM is here!

    STORM supercharges Unity to render massive open AAA worlds—on mobile and desktop—up to 10 times faster.

    STORM is your go-to tool for game makers and studios who are serious about performance and profitability.

  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
×
×
  • Create New...