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

Snap zones don't snap correctly objects with attach transform #198

Open
mrwellmann opened this issue Apr 17, 2024 · 3 comments
Open

Snap zones don't snap correctly objects with attach transform #198

mrwellmann opened this issue Apr 17, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mrwellmann
Copy link
Contributor

Objects with attach transform can be oriented incorrectly when snapped to a snap zone.

User Ashes apparently solved this:

The snapzone script has two functions:

  1. ForceSelect
  2. DrawHighlightMesh

These functions are using attachtransform's transform for the snapped object. But there is an assumption here that the AttachTransform is the gameobject having the snapzonepreviewdrawer script. I simply added same condition in both these functions to check if the attachedTransform gameobject is having the snapzonepreviewdrawer script, if not then parent is used. (ofcourse I am assuming as well that the AttachTransform could only be either gameobject with SnapZonePreviewDrawer or direct child that gameobject).

SnapZone.zip

@mrwellmann mrwellmann added bug Something isn't working good first issue Good for newcomers labels Apr 17, 2024
@mrwellmann
Copy link
Contributor Author

Tracking with internal reference is MP-2143

@Abhishek21296
Copy link

Yeah, that was long back in August. And the assumption I made could also be a dealbreaker for few.

@mrwellmann
Copy link
Contributor Author

Okay I conclude it is an issue but your solution (I put into the zip file) might not be a fix for all use cases.
I leave this open for now if anyone wants to try to figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants