mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 07:58:05 +02:00
Update position of grid-to-avatar to be at the left foot
This commit is contained in:
parent
fbdc509428
commit
eafe1ae951
1 changed files with 5 additions and 1 deletions
|
@ -439,7 +439,11 @@ GridTool = function(opts) {
|
|||
} else if (overlay == uiOverlays.snapToGridCheckbox.overlay) {
|
||||
horizontalGrid.setSnapToGrid(!horizontalGrid.getSnapToGrid());
|
||||
} else if (overlay == uiOverlays.moveToAvatar.overlay) {
|
||||
horizontalGrid.setPosition(MyAvatar.position);
|
||||
var position = MyAvatar.getJointPosition("LeftFoot");
|
||||
if (position.x == 0 && position.y == 0 && position.z == 0) {
|
||||
position = MyAvatar.position;
|
||||
}
|
||||
horizontalGrid.setPosition(position);
|
||||
} else if (overlay == uiOverlays.moveToSelection.overlay) {
|
||||
var newPosition = selectionManager.worldPosition;
|
||||
newPosition = Vec3.subtract(newPosition, { x: 0, y: selectionManager.worldDimensions.y * 0.5, z: 0 });
|
||||
|
|
Loading…
Reference in a new issue