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

Correct allowed rotation for placed objects #1310

Merged
merged 58 commits into from
Nov 12, 2023

Conversation

stilnat
Copy link
Contributor

@stilnat stilnat commented Nov 11, 2023

Summary

This introduce the possibility to have custom rotation while placing object with the construction menu. By default, tile objects have four possible directions. I wrote a bunch of scripts that can be added to prefabs to allow for custom rotation. it can limit it or add more possible directions, but possibly also add complex rotation behaviour such as :

North-South-East-West-NorthEast-SouthWest-North....

this is a nonsensical example but just to illustrate the freedom.
Currently, there's only one script that allow only checked directions to work.

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.
  • Update the related GitBook document, or create a new one if needed.

Testing

Simply try to rotate all the modified prefabs, as liste in the issue closed by this PR.

Networking checklist

  • Works from host in host mode.
  • Works from server in server mode.
  • Works on server in client mode.
  • Works and is syncronized across different clients.
  • Is persistent.

Changes

  • Added an interface for custom rotation.
  • Added a single script implementing it, allowing to choose which rotation to allow.
  • Put this scripts on all prefab needing it.

Related issues/PRs

closes #1300

@stilnat stilnat changed the title [WIP] Correct allowed rotation for placed objects Correct allowed rotation for placed objects Nov 11, 2023
@cosmiccoincidence cosmiccoincidence added the Tilemaps Tasks related to the tilemap system or its connectors. label Nov 11, 2023
@cosmiccoincidence cosmiccoincidence merged commit 07021c0 into RE-SS3D:develop Nov 12, 2023
2 checks passed
@stilnat stilnat deleted the fix-adjacency-rotation branch November 16, 2023 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tilemaps Tasks related to the tilemap system or its connectors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit rotation of build hologram on certain objects
2 participants