Back to the Shapespark home page

Minimum distance from wall

Is there a way to limit how close to a wall you can get? I’ve seen in the forums the technique of transparent walls used like a fence, but I’d like to maintain click-ability on wall objects…

Thanks!

There is a global setting for this, but only for click and touch based navigation. There is no setting for controlling how close you can get to walls while walking with arrows on the keyboard. For clicks you can change this global setting by placing a body-end.html like this: https://gist.github.com/wrr/955b5657feefc60f42490fba3e605793 in your scene folder, but replace

WALK.CAMERA_WALK_NEAR = 0.03;

with

WALK.CLICK_MOVE_MIN_DISTANCE_TO_OBSTACLE = 1.5;

This setting is in meters, but default it is 0.7.

1 Like