I am currently working on achieving a specific goal.
https://i.sstatic.net/XnAmo.png
Instead of moving farther away from the object, the two arrow helpers seem to be shifted inward. How can I adjust their positioning to move them away from the object?
Below is the code snippet in question:
var startx = wall.getStartX();
var starty = wall.getStartY();
var endx = wall.getEndX();
var endy = wall.getEndY();
// This section determines how far the arrow should be moved away
// This is where I am encountering difficulty
if (wall.getWallOrientation() == 'horizontal') {
starty += 50;
endy += 50;
} else {
// Vertical
startx += 50;
endx += 50;
}
// Define start and end points of the dimension
var from = new THREE.Vector3(startx, 0, starty);
var to = new THREE.Vector3(endx, 0, endy);
var direction = to.clone().sub(from);
var length = direction.length();
var hex = 0x0;
var arrowGroupHelper = new THREE.Group();
arrowGroupHelper.add(new THREE.ArrowHelper(direction.normalize(), from, length, hex, 10, 10));
arrowGroupHelper.add(new THREE.ArrowHelper(direction.negate(), to, length, hex, 10, 10));
Thank you for your help and support!