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

grid and scene snapping #313

Merged
merged 22 commits into from
Apr 21, 2022
Merged

grid and scene snapping #313

merged 22 commits into from
Apr 21, 2022

Conversation

neph1
Copy link
Contributor

@neph1 neph1 commented Mar 20, 2022

A feature which for some reason was only half implemented(?). I know I have wished for this many times.

video showing snapping in SDK

@neph1
Copy link
Contributor Author

neph1 commented Mar 20, 2022

crap. i committed a file which shouldn't have been. will update

@neph1
Copy link
Contributor Author

neph1 commented Mar 20, 2022

Interesting how it allowed the first commit through. Does it choose a couple of things at random to complain about? :)

@neph1
Copy link
Contributor Author

neph1 commented Mar 21, 2022

I'll see if I can resolve the complexity issue tonight. Might be a good thing so the snapping can be applied to other transforms in the future.

@neph1
Copy link
Contributor Author

neph1 commented Mar 22, 2022

Finally. Didn't want to autoformat, because that brought so many more "errors". Better to refactor that separately. Feel free to squash commit this.

@neph1
Copy link
Contributor Author

neph1 commented Mar 31, 2022

Refactored a bit now that I have a better understanding of the architecture

@neph1
Copy link
Contributor Author

neph1 commented Mar 31, 2022

There are also two types of scene snapping (that I can think of). I guess the one I implemented is the more commonly requested, "snap to ground". The other would be "mouse pick snap" where you snap to whatever you click on. Most of that is already implemented in the PickManager class, so it could easily be added as well.

@neph1
Copy link
Contributor Author

neph1 commented Apr 8, 2022

Realized there's some work left; I'll change so that snapping only applies to the axis/axes you're editing. I'll also add 15 degree rotation snapping if grid snapping is enabled (unless there are complaints). Not 100% intuitive, but a useful feature, I think.

@tonihele
Copy link
Contributor

tonihele commented Apr 9, 2022

Issues

  • Solved 3
  • Added 6

Heh, Codacy <3 Thoughts and prayers...

@neph1
Copy link
Contributor Author

neph1 commented Apr 9, 2022

(╯°□°)╯︵ ┻━┻

@tonihele
Copy link
Contributor

tonihele commented Apr 9, 2022

It would be so good to have static code analysis that can be also used in the IDE, with the same ruleset...

@tonihele tonihele added this to the 3.4 release milestone Apr 21, 2022
@tonihele tonihele self-assigned this Apr 21, 2022
@tonihele
Copy link
Contributor

Very nice, thank you for your contribution!

@tonihele tonihele merged commit f7f81f7 into jMonkeyEngine:master Apr 21, 2022
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.

2 participants