Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Planet] Update collision size on setPlanetRadius, setDistanceFromMovementPlane #1958

Closed

Conversation

oznogon
Copy link
Contributor

@oznogon oznogon commented Mar 25, 2023

When changing the planet radius with setPlanetRadius or z-coordinate with setDistanceFromMovementPlane, the planet's collision radius doesn't change. This updates the collision radius in setPlanetRadius and setDistanceFromMovementPlane.

Fixes #1957.

@oznogon oznogon changed the title [Planet] Update collision size on setPlanetRadius [Planet] Update collision size on setPlanetRadius, setDistanceFromMovementPlane Mar 25, 2023
@daid
Copy link
Owner

daid commented Mar 26, 2023

Wont work correctly for multiplayer, clients keep the old collision size

@oznogon
Copy link
Contributor Author

oznogon commented Mar 26, 2023

Networked server (top) and client, default 2U radius:

image

10U radius:

image

Collision occurring on both:

image

The client doesn't get the new radius for the radar collision size but does get the planet radius in 3D views, and the collision occurs on the server side.

If the only thing the client radar uses to draw the circle is the collision radius, and the client already gets the planet radius and z-coordinate for 3D rendering, and the collisions happen on the server, then does the client really need the collision radius?

Can it just draw the planet radius, or derive the collision radius from the planet radius the same way as the server does from the planet radius?

@oznogon
Copy link
Contributor Author

oznogon commented Mar 26, 2023

Pushed a replication commit, and a local recalculation in drawOnRadar in oznogon/1957-update-planet-collisionsize-locally (oznogon@e00013f).

@oznogon
Copy link
Contributor Author

oznogon commented Mar 28, 2023

Closed for #1960.

@oznogon oznogon closed this Mar 28, 2023
@oznogon oznogon deleted the 1957-update-planet-collision-on-resize branch March 28, 2023 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Planet] Collision radius isn't updated with object radius
2 participants