mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
make sure observed held objects are active in bullet, disable equip spring action
This commit is contained in:
parent
11f18c3ada
commit
7f95e1eec6
2 changed files with 10 additions and 3 deletions
|
@ -479,7 +479,11 @@ function MyController(hand) {
|
|||
this.setState(STATE_NEAR_GRABBING);
|
||||
} else { // equipping
|
||||
if (typeof grabbableData.spatialKey !== 'undefined') {
|
||||
this.setState(STATE_EQUIP_SPRING);
|
||||
// TODO
|
||||
// if we go to STATE_EQUIP_SPRING the item will be pulled to the hand and will then switch
|
||||
// to STATE_EQUIP. This needs some debugging, so just jump straight to STATE_EQUIP here.
|
||||
// this.setState(STATE_EQUIP_SPRING);
|
||||
this.setState(STATE_EQUIP);
|
||||
} else {
|
||||
this.setState(STATE_EQUIP);
|
||||
}
|
||||
|
@ -493,7 +497,9 @@ function MyController(hand) {
|
|||
this.grabbedEntity = intersection.entityID;
|
||||
if (typeof grabbableData.spatialKey !== 'undefined' && this.state == STATE_EQUIP_SEARCHING) {
|
||||
// if a distance pick in equip mode hits something with a spatialKey, equip it
|
||||
this.setState(STATE_EQUIP_SPRING);
|
||||
// TODO use STATE_EQUIP_SPRING here once it works right.
|
||||
// this.setState(STATE_EQUIP_SPRING);
|
||||
this.setState(STATE_EQUIP);
|
||||
return;
|
||||
} else if (this.state == STATE_SEARCHING) {
|
||||
this.setState(STATE_DISTANCE_HOLDING);
|
||||
|
@ -1248,4 +1254,4 @@ function cleanup() {
|
|||
}
|
||||
|
||||
Script.scriptEnding.connect(cleanup);
|
||||
Script.update.connect(update);
|
||||
Script.update.connect(update);
|
||||
|
|
|
@ -330,5 +330,6 @@ void AvatarActionHold::deserialize(QByteArray serializedArguments) {
|
|||
_active = true;
|
||||
});
|
||||
|
||||
activateBody();
|
||||
forceBodyNonStatic();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue