Comments (9)
We should log the GameMain.mainPlayer.transform.position
to look at what is our position when we are in space. I wonder if they are doing some matrix transformation of the world to fake the player movement in space to avoid floating point precision issues.
from nebula.
Alright, so I've been doing some digging and it's exactly what I thought. So to avoid floating point precision issues, what they did is that while the player is on a local planet, the planet is your world origin and they move the player physically around the planet. But then as soon as you leave the planet and you are moving in space, they are doing a clever trick of instead snapping the player to the position 0,0,0 in the world, the player never moves, its the world / planets that move towards the player.
That way the player will never experience floating point imprecision when the floating point number becomes to big.
from nebula.
That being said, it will be tricky to fix this issue. We will need to find a way to fake the remote player position when they "move" in space next to us. Also, we must hide the remote players that are not on our local planet else we will kind of be seeing every players that are on all the other planet on our planet since the player coordinate system is the same on all planets.
from nebula.
We can just compare the localPlanet.id too determine who needs to be visible and who needs to be hidden.
from nebula.
But what if 2 players are in space? Wouldnt they both be at the origin?
from nebula.
I guess thats whats happening, see the image at the top
from nebula.
Yupp, so either we make it so players cant see eachother in space, or we need to calculate an offset to render remote players
from nebula.
I think players should be able to see each other in space, else it would look really weird if you fly together and the other disappears suddenly.
from nebula.
I'm currently working on this
from nebula.
Related Issues (20)
- Nebula does not work with 0.10.x HOT 10
- Sync the new StorageComponent.SetFilter(int,int)
- Unsynchronized counter for PLS and ILS leads to accidental linking HOT 1
- BepInEx Version HOT 1
- Nebula not compatible with version 0.10.28.x HOT 1
- Is there any chance this project will evolve into a decoupled server? HOT 2
- Unable to launch the game properly! HOT 2
- Whether to consider compatibility with dark fog? HOT 1
- The effect of turning on sandbox mode will be retained in the branch of Black Mist Online HOT 5
- Dark Fog bug HOT 5
- Planetary Shield can't stop the Dark Fog Repeater from landing HOT 7
- The threat percentage of client players cannot be displayed correctly HOT 2
- [Headless] newgame HOT 3
- When connected player is attacked the shield of host player is also reduced
- Discord Activity not starting (Cracked Game Version) HOT 1
- can't setup headless server HOT 1
- Mod not compatible with new update HOT 4
- [Headless] The host seems unaware of clients threat generation. HOT 2
- Error when loading the save games HOT 5
- Thread percentage of clients stays at zero
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nebula.