-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthigh priorityveinminerAnything relating to veinminerAnything relating to veinminer
Description
Context
The current search algorithm is perfectly valid, but produces results that can look “wrong” to players. This is because the offsets are hardcoded world directions.
Proposed solution
- Treat the offsets as local vectors in a broken block face’s TBN coordinate system
- When a user breaks a block, get the normal of the face that the user mined (this should be possible, but might need a raycast instead of being returns)
- To calculate the bitangent (and by extension the tangent), use the following rules:
- If the face is vertical, the bitangent is always up
- If the face is horizontal, the bitangent is the up vector of the player’s camera, with y set to 0 and normalised, and then rounded to the nearest orthogonal direction
- Use these vectors to transform the local offsets to world vectors
Once the above work is complete, we’ll likely also need to order the offset tables better to produce a more hand-crafted result
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthigh priorityveinminerAnything relating to veinminerAnything relating to veinminer