Merge pull request #39 from AleziaKurdis/FixDopplegangerPosition

Fix doppleganger height positioning issue
This commit is contained in:
ksuprynowicz 2023-10-05 19:52:44 +02:00 committed by GitHub
commit c13d210db4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -172,7 +172,7 @@ Doppleganger.prototype = {
}
this.frame = 0;
this.position = options.position || Vec3.sum(avatar.position, Quat.getForward(avatar.orientation));
this.position = options.feetPosition || Vec3.sum(avatar.feetPosition, Quat.getForward(avatar.orientation));
this.orientation = options.orientation || avatar.orientation;
this.skeletonModelURL = avatar.skeletonModelURL;
this.jointStateCount = 0;
@ -189,7 +189,8 @@ Doppleganger.prototype = {
visible: false, // normally false
modelURL: this.skeletonModelURL, //was field: url
position: this.position,
rotation: this.orientation
rotation: this.orientation,
useOriginalPivot: true
};
this.entityID = Entities.addEntity(prop, "local");

View file

@ -172,7 +172,7 @@ Doppleganger.prototype = {
}
this.frame = 0;
this.position = options.position || Vec3.sum(avatar.position, Quat.getForward(avatar.orientation));
this.position = options.feetPosition || Vec3.sum(avatar.feetPosition, Quat.getForward(avatar.orientation));
this.orientation = options.orientation || avatar.orientation;
this.skeletonModelURL = avatar.skeletonModelURL;
this.jointStateCount = 0;
@ -189,7 +189,8 @@ Doppleganger.prototype = {
visible: false, // normally false
modelURL: this.skeletonModelURL, //was field: url
position: this.position,
rotation: this.orientation
rotation: this.orientation,
useOriginalPivot: true
};
this.entityID = Entities.addEntity(prop, "local");