mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:22:57 +02:00
Disable attach point saving
This commit is contained in:
parent
37d60c6c85
commit
e4794450c2
1 changed files with 5 additions and 2 deletions
|
@ -264,6 +264,9 @@ function propsArePhysical(props) {
|
||||||
return isPhysical;
|
return isPhysical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// currently disabled.
|
||||||
|
var USE_ATTACH_POINT_SETTINGS = false;
|
||||||
|
|
||||||
var ATTACH_POINT_SETTINGS = "io.highfidelity.attachPoints";
|
var ATTACH_POINT_SETTINGS = "io.highfidelity.attachPoints";
|
||||||
function getAttachPointSettings() {
|
function getAttachPointSettings() {
|
||||||
try {
|
try {
|
||||||
|
@ -1858,7 +1861,7 @@ function MyController(hand) {
|
||||||
// if an object is "equipped" and has a predefined offset, use it.
|
// if an object is "equipped" and has a predefined offset, use it.
|
||||||
this.ignoreIK = grabbableData.ignoreIK ? grabbableData.ignoreIK : false;
|
this.ignoreIK = grabbableData.ignoreIK ? grabbableData.ignoreIK : false;
|
||||||
|
|
||||||
var offsets = getAttachPointForHotspotFromSettings(this.grabbedHotspot, this.hand);
|
var offsets = USE_ATTACH_POINT_SETTINGS && getAttachPointForHotspotFromSettings(this.grabbedHotspot, this.hand);
|
||||||
if (offsets) {
|
if (offsets) {
|
||||||
this.offsetPosition = offsets[0];
|
this.offsetPosition = offsets[0];
|
||||||
this.offsetRotation = offsets[1];
|
this.offsetRotation = offsets[1];
|
||||||
|
@ -2065,7 +2068,7 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.holdExit = function () {
|
this.holdExit = function () {
|
||||||
// store the offset attach points into preferences.
|
// store the offset attach points into preferences.
|
||||||
if (this.grabbedHotspot) {
|
if (USE_ATTACH_POINT_SETTINGS && this.grabbedHotspot && this.grabbedEntity) {
|
||||||
entityPropertiesCache.addEntity(this.grabbedEntity);
|
entityPropertiesCache.addEntity(this.grabbedEntity);
|
||||||
var props = entityPropertiesCache.getProps(this.grabbedEntity);
|
var props = entityPropertiesCache.getProps(this.grabbedEntity);
|
||||||
var entityXform = new Xform(props.rotation, props.position);
|
var entityXform = new Xform(props.rotation, props.position);
|
||||||
|
|
Loading…
Reference in a new issue