mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:07:07 +02:00
Change teleport.js to update render state more frequently.
This commit is contained in:
parent
6ad2e28c29
commit
13eb7db462
1 changed files with 29 additions and 27 deletions
|
@ -236,22 +236,10 @@ function Teleporter(hand) {
|
|||
[],
|
||||
100);
|
||||
|
||||
this.enterTeleport = function() {
|
||||
if (coolInTimeout !== null) {
|
||||
Script.clearTimeout(coolInTimeout);
|
||||
}
|
||||
|
||||
this.state = TELEPORTER_STATES.COOL_IN;
|
||||
coolInTimeout = Script.setTimeout(function() {
|
||||
if (_this.state === TELEPORTER_STATES.COOL_IN) {
|
||||
_this.state = TELEPORTER_STATES.TARGETTING;
|
||||
}
|
||||
}, COOL_IN_DURATION);
|
||||
|
||||
this.updatePadDimensions = function() {
|
||||
// pad scale with avatar size
|
||||
var AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS = Vec3.multiply(MyAvatar.sensorToWorldScale, TARGET_MODEL_DIMENSIONS);
|
||||
|
||||
if (!Vec3.equal(AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS, cancelEnd.dimensions)) {
|
||||
cancelEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
|
||||
teleportEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
|
||||
seatEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
|
||||
|
@ -275,6 +263,20 @@ function Teleporter(hand) {
|
|||
LaserPointers.editRenderState(this.teleportRayHeadVisible, "seat", teleportRenderStates[2]);
|
||||
LaserPointers.editRenderState(this.teleportRayHeadInvisible, "seat", teleportRenderStates[2]);
|
||||
}
|
||||
|
||||
this.enterTeleport = function() {
|
||||
if (coolInTimeout !== null) {
|
||||
Script.clearTimeout(coolInTimeout);
|
||||
}
|
||||
|
||||
this.state = TELEPORTER_STATES.COOL_IN;
|
||||
coolInTimeout = Script.setTimeout(function() {
|
||||
if (_this.state === TELEPORTER_STATES.COOL_IN) {
|
||||
_this.state = TELEPORTER_STATES.TARGETTING;
|
||||
}
|
||||
}, COOL_IN_DURATION);
|
||||
|
||||
this.updatePadDimensions();
|
||||
};
|
||||
|
||||
this.isReady = function(controllerData, deltaTime) {
|
||||
|
|
Loading…
Reference in a new issue