Place blocks against actual hit face on non-full blocks - #3642
Conversation
|
I'll put this in waiting for artistic review to make a decision on whether this is good or not. I personally don't think it's a good idea to tie it to a rotation mode, the interface is already complex and full of side effects, if someone e.g. wants to add a snow layer block with the same properties, then we have to introduce a new rotation mode just for that. |
careeoki
left a comment
There was a problem hiding this comment.
Yes, feels so much better. Now you can bridge outwards with branches and such.
And yeah I think it as a block property makes sense
|
Also I'm not really a fan of the naming here. Maybe it would be more helpful to use an enum here, e.g. .placementMode = .faceNormal,
.placementMode = .gridNeighbor .gridFace .whatever?, |
|
Alright, it's an enum now |
| // TODO: Test entities | ||
| } | ||
|
|
||
| fn dominantAxisNeighbor(normal: Vec3f) Vec3i { |
There was a problem hiding this comment.
This has edge cases that are very unintuitive (e.g. grass vegetation and flowers have tilted faces which do not work well at all with this).
|
Sure, I'll wait for the merge |
|
In my opinion normal based placing feels rather unintuitive, I'd expect it to be placed based on the bounding box instead, otherwise it depends on surface details that may not even be highlighted. Also I found even more edge cases (e.g. chains), where (because the textures have gaps) it doesn't even use the normal of the face you are seemingly pointing at. |
|
Yep works way better using the bounding box |
|
#3648 is merged, please rebase |
|
Rebased |
Added a
placementModeblock property (.boundingBoxor.gridNeighbor, defaults to.boundingBox) so placement now uses the hit selection bounding box face for the neighbor cell by default. The carpet rotation blocks set this to.gridNeighborsince the old grid-crossing behavior is intentional for placing carpets next to each other.Fixes #3520