mirror of
https://github.com/lubosz/overte.git
synced 2025-04-15 17:20:29 +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;
|
||||
}
|
||||
|
||||
// currently disabled.
|
||||
var USE_ATTACH_POINT_SETTINGS = false;
|
||||
|
||||
var ATTACH_POINT_SETTINGS = "io.highfidelity.attachPoints";
|
||||
function getAttachPointSettings() {
|
||||
try {
|
||||
|
@ -1858,7 +1861,7 @@ function MyController(hand) {
|
|||
// if an object is "equipped" and has a predefined offset, use it.
|
||||
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) {
|
||||
this.offsetPosition = offsets[0];
|
||||
this.offsetRotation = offsets[1];
|
||||
|
@ -2065,7 +2068,7 @@ function MyController(hand) {
|
|||
|
||||
this.holdExit = function () {
|
||||
// store the offset attach points into preferences.
|
||||
if (this.grabbedHotspot) {
|
||||
if (USE_ATTACH_POINT_SETTINGS && this.grabbedHotspot && this.grabbedEntity) {
|
||||
entityPropertiesCache.addEntity(this.grabbedEntity);
|
||||
var props = entityPropertiesCache.getProps(this.grabbedEntity);
|
||||
var entityXform = new Xform(props.rotation, props.position);
|
||||
|
|
Loading…
Reference in a new issue