Hello,
I am working on a project where the player is a spaceship in a solar system. I am trying to keep the player at the world origin (0.0.0 in X, Y and Z) but have all the planets, spacestations and other spaceships move backwards when the player accelerates forward. Problem is, I have no idea how to accomplish this. I’ve tried giving each object its own set of Physics Thrusters and give them Add Impulse whenever I press the W button to “move forward” but this didn’t work. I suspect this would also be a huge performance draw once dozens of objects are spawned simultaneously.
Looking through various forums, I read about people suggesting parenting all objects (planets, etc) in the level to a single invisible parent object and then moving that parent based on player position. It’s just that I don’t really know how this would work? Does anyone have a solution for this problem? I would really appreciate it, as this is currently the only hurdle holding me back from creating huge environments for my game.
Thanks in advance for any suggestions or assistance you can offer,
The problem is distance. I’m using World Origin Rebasing and World Composition, but it only allows the player to move only about 20km in the Z axis before running into precision errors and crashing the game. Also, I’m talking about a playable area of about 8000km across in the X and Y axes.
Maybe I’m doing something wrong with World Origin Rebasing? It should keep moving the world origin to wherever the player pawn is, but apparently, it only does this on a flat plane (X and Y). It doesn’t seem to take the Z axis into account.
Also, does it still bog the system down with only about 5 objects (planets) in sight at a time? Anything smaller than that gets despawned when it’s too far away for the player to see anymore.
Moving the ship is the best option.
Moving all objects is nuts :), even if they are parented, it very quickly bogs the system down ( think > 10 objects ).
What’s wrong with moving the ship?
Hi,
How are you updating/changing the World Origin Location? Based on what I see available in Blueprints, all three axises are available.
This is my first time working with World Origin Rebasing. I simply have it turned on in the World Settings. This updates the world origin based on the player’s position, but only seems to do this succesfully for the X and Y axes. Whenever I move more than 10km up or down from Z=0, the simulation crashes. Should I be manually setting the world origin location for the player pawn as well? If so, wouldn’t that kind of defeat the purpose of the World Origin Rebasing feature built into the engine?
I suspect I won’t need World Origin Rebasing at all if I can find a way to move objects other than the player pawn in the scene. Since the player would always be at the world origin anyway. That would allow for the creation of an infinite game world. Or am I missing something huge here?