mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 23:13:21 +00:00
Added a distance relative scaling clamp to improve depth perception when viewing travel anchors through walls.
This commit is contained in:
1 parent
f0352c92ad
commit
7565fed7ea
1 file changed
+5
@@ -302,6 +302,11 @@ public class TravelController implements ITickHandler {
|
||||
if(mix > 0) {
|
||||
double d = Math.tan(fovRad) * currentView.getEyePoint().distance(loc) * 0.01;
|
||||
scale = d / referenceScalingDistance;
|
||||
|
||||
//only apply 70% of the scaling so more distance targets are still smaller than closer targets
|
||||
float nf = 1 - MathHelper.clamp_float((float) currentView.getEyePoint().distanceSquared(loc) / TravelSource.STAFF.maxDistanceTravelledSq, 0, 1);
|
||||
scale = scale * (0.3 + 0.7 * nf);
|
||||
|
||||
scale = (scale * mix) + (1 - mix);
|
||||
scale = Math.max(1, scale);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user