Skip to content

Instantly share code, notes, and snippets.

@Cold06
Created August 9, 2023 15:03
Show Gist options
  • Save Cold06/46618d19ef735a42b59ba714ffa9f6a5 to your computer and use it in GitHub Desktop.
Save Cold06/46618d19ef735a42b59ba714ffa9f6a5 to your computer and use it in GitHub Desktop.
HOW are we in 2023 and didn't solve this yet?

Preface: Warframe portals WILL NOT work with lumen

No response 💀

It is something very difficult to do but is also worthless to almost every type of game.

[EXTREMELY LOUD INCORRECT BUZZER]

Doing a bit of special case handling for your velocity for when you start and stop being in contact with the object

Will create tons of bugs

Star Citizen needs it because it deals with insane distances, insane speeds.

Literally me

Still no way of doing that

My brother and I were actually working on recreating this effect in Unity recently. The trick we settled on was simple - don't actually move the ship.

[EXTREMELY LOUD INCORRECT BUZZER]

Short answer is that you need to tailor such a solution to your engine's particular physics system.

How? No response

Your solution would be to code custom movement that takes in the large object's current motion into account and moving the player's position relative to that righ

[EXTREMELY LOUD INCORRECT BUZZER]

There is a free engine plugin called "Smooth Sync"

[EXTREMELY LOUD INCORRECT BUZZER]

I do wish unreal had something like physics "bubbles" --everything outside a "bubble would act normally, and inside it would be it's own stationary physics "world". Doesnt seem too impossible a engine feature :)

[EXTREMELY LOUD CORRECT 👍 BUZZER]

Transitioning between physics worlds gets really weird really quickly.

Probably, still think it should be up to blueprint code to decide how handle "weird" transitions.

You could try to add the ship's horizontal speed to the player's?

[EXTREMELY LOUD INCORRECT BUZZER]

You could always look at how warframe solved it by applying a simple trick to work around the issue.

Again, this sort of hack will not work with lumen since the geometry is no longer consistent in the world space

The outside would be a box with an emissive texture, and would bug everything out

I think you’ll find that 99% of games where you walk around inside a spaceship, the ship is not moving. Just the things outside.

Correct, but its a MASSIVE hack just to make physics work, looks like its easier to just create a physics subscene and let blueprints manage objects going in and out, than to design your entire game arround this hack.

If you’re travelling at warp, [the ship doesn't move]

Yeah i agree with that, at wrap speed you don't really need the subgrid system, it is mostly required for when the ships have the chance to interact with stuff outside it, like during salvage.

The problem with AFF style Render-Texture is that it works well for AFF, but for other games just getting RT to accurately match the rendered Viewport is a challenge

Finnaly someone that speaks english

... I recorded a video from my project ... where I first show the ship movement blueprint and then what it looks like in action As you can see the client is being moved along with the ship but its very jagged and jumps around quite a bit.

Thats my problem too

I’ve some ideas / suggestions about how you might be able to be get SetBase exposed to BP (offline is better so check PM). But that won’t solve all the problems (see the thread @perspecdev linked to). However, if you do get this working in the future please share…

No response 💀

Welcome to unreal. You trying to do quite ambitious thing.

Yeah, let's solve...

First thing you should realize is that you are making game, you need to FOOL player that your ship is moving, not make simulation of moving ship.

Or I can FOOL the game objects into thinking they are at 0,0,0 while they actualy are at PositionOfTheContainerAtTheTopOfTheContainerStackStack + 0,0,0

I want to create a ship that when you go inside and lock the door the ship becomes separate from the inside so that a player can walk

I not my case, but usefull limitation to decide, could unlock some optimizations if subgrids are really impossible

Maybe separate the landing/takeoff into own level and

[EXTREMELY LOUD INCORRECT BUZZER]

[The gravity should point down] Even if it flips upside down or the actor jumps?

Yes 🗿

search for gameplay clips of Angels-Fall-First

[EXTREMELY LOUD INCORRECT BUZZER]

Scene capture2d is a bad choice since the windows and the view inside of the windows change with the position of each player’s head.

Render to textures create tons of unrealted issues what I would rather not need to solve, like we are solving a difficult problem, with another unrelated difficult solution, that will probably make the game inflexible in the long run, if only I had a physics subgrid...

IIf you were working in C++ or in a custom engine, I could imagine solutions involving parenting objects to the moving ship and getting the game-physics and networking to play nice with parented objects.

He might be onto something

Attach a plane to the hidden stationary ship, and rotate it to always be “behind” the ship (opposite the player camera direction), and render it in screen-space…

Nahh....

There are some artifacts when you simply attach the actor to the moving actor.

Yeah simply attaching won't work at all

As for the best way, AFAIK, Star Citizen handles it by having multiple physics ‘scenes’, one for the world and one for the interior of each ship. This allows the ship’s movement or position to not adversely affect the calculations for the interior physics.

Yes, lets JUST do that

For handling a large universe, or even something the size of a solar system, I have no idea how to accurately simulate the distances involved. It gets even dicier when multiplayer is involved, too.

This is were we FOOL the player, they won't even leave half of the Float32 range of distance

Is such a partitioning possible or are there plans to make it possible? Looking at engine source, it seems there is a hard 1:1 relation between UWorld and FPhysScene.

This looks like a problem

I’ve found a couple of dribs and drabs about it here and on Reddit, but what I’ve found is all pondering and no solutioning.

Literally me

Nothing 💀

Nothing 💀

Nothing 💀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment