-
Notifications
You must be signed in to change notification settings - Fork 81
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
6D Facedir management and automatic orientation during flip and rotate #92
base: master
Are you sure you want to change the base?
Conversation
…erning orientation
worldedit/manipulations.lua
Outdated
-- @return The number of nodes flipped. | ||
function worldedit.flip(pos1, pos2, axis) | ||
function worldedit.flipnodes(pos1, pos2, axis) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flip_nodes
Seems good, I only noticed minor issues. |
Thanks for the feedback ShadowNinja. flipnodes renamed and spaces before columns removed (putting space before column is the french way, should get rid of this habit :) ). I left extra dash on the TODO comment as there are extra dashes on other TODO comments. |
l should have taken a look at existing PRs. How did you find out all the param2 values? |
On a platform in game, I put all 24 facedir position, took a screenshot and numbered them. That was my bible while writing the PR :) |
There may be a way to calculate them, l assume it's called 6d facedir because there are 6*4 possible values: 4 for yaw, 4 for pitch and 2 for another pitch Anyway, thanks for fixing rotate, orient and flip. |
You're welcome. |
l guess tables also work faster. |
related: 0aeee79 |
Hello,
Here is a pull request for adding 6D facedir management. 6D facedir is managed in orient function for rotate and flip operations.
Orient function/command has been modified so it takes two more parameters : the kind of operation (flip or rotate) and the axis.
I also changed rotate and flip so they automatically orient facedir and wallmount of rotated/flipped nodes. flip function has been split in "flipnodes" which flips node but don't do any orientation and "flip" that does both.
There is still an issue with "flip" orientation and diagonal symmetric nodes (roof corners...) which should be rotated instead of flipped.