mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 18:26:11 +02:00
Hooked up variations of seated while talking and stubs for reactions while seated.
This commit is contained in:
parent
aad6958b68
commit
c8e4536bba
6 changed files with 106 additions and 13 deletions
Binary file not shown.
Binary file not shown.
BIN
interface/resources/avatar/animations/sitting_talk02.fbx
Normal file
BIN
interface/resources/avatar/animations/sitting_talk02.fbx
Normal file
Binary file not shown.
BIN
interface/resources/avatar/animations/sitting_talk03.fbx
Normal file
BIN
interface/resources/avatar/animations/sitting_talk03.fbx
Normal file
Binary file not shown.
|
@ -590,29 +590,117 @@
|
|||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 271,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/sitting_talk02.fbx"
|
||||
},
|
||||
"id": "seatedTalk02",
|
||||
"type": "clip"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 252,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/sitting_talk03.fbx"
|
||||
},
|
||||
"id": "seatedTalk03",
|
||||
"type": "clip"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 500,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/talk.fbx"
|
||||
"currentState": "seatedTalk02",
|
||||
"randomSwitchTimeMax": 10,
|
||||
"randomSwitchTimeMin": 1,
|
||||
"states": [
|
||||
{
|
||||
"id": "seatedTalk02",
|
||||
"interpDuration": 6,
|
||||
"interpTarget": 6,
|
||||
"priority": 1,
|
||||
"resume": true,
|
||||
"transitions": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "seatedTalk03",
|
||||
"interpDuration": 6,
|
||||
"interpTarget": 6,
|
||||
"priority": 1,
|
||||
"resume": true,
|
||||
"transitions": [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "seatedTalk",
|
||||
"type": "clip"
|
||||
"type": "randomSwitchStateMachine"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 800,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/sitting_idle.fbx"
|
||||
},
|
||||
"id": "seatedIdle01",
|
||||
"type": "clip"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 800,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/sitting_idle.fbx"
|
||||
},
|
||||
"id": "seatedIdle02",
|
||||
"type": "clip"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 800,
|
||||
"loopFlag": true,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
"url": "qrc:///avatar/animations/sitting_idle02.fbx"
|
||||
"currentState": "seatedIdle01",
|
||||
"randomSwitchTimeMax": 10,
|
||||
"randomSwitchTimeMin": 1,
|
||||
"states": [
|
||||
{
|
||||
"id": "seatedIdle01",
|
||||
"interpDuration": 6,
|
||||
"interpTarget": 6,
|
||||
"priority": 1,
|
||||
"resume": true,
|
||||
"transitions": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "seatedIdle02",
|
||||
"interpDuration": 6,
|
||||
"interpTarget": 6,
|
||||
"priority": 1,
|
||||
"resume": true,
|
||||
"transitions": [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "seatedIdle",
|
||||
"type": "clip"
|
||||
"type": "randomSwitchStateMachine"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
|
|
|
@ -1942,8 +1942,13 @@ void Rig::updateReactions(const ControllerParameters& params) {
|
|||
reactionPlaying = idleStateMachine->getCurrentStateID().startsWith("reaction");
|
||||
}
|
||||
|
||||
bool isSeated = _state == RigRole::Seated;
|
||||
bool hipsEnabled = params.primaryControllerFlags[PrimaryControllerType_Hips] & (uint8_t)ControllerFlags::Enabled;
|
||||
if (reactionPlaying && !hipsEnabled) {
|
||||
bool hipsEstimated = params.primaryControllerFlags[PrimaryControllerType_Hips] & (uint8_t)ControllerFlags::Estimated;
|
||||
bool hmdMode = hipsEnabled && !hipsEstimated;
|
||||
|
||||
if ((reactionPlaying || isSeated) && !hmdMode) {
|
||||
// TODO: make this smooth.
|
||||
// disable head IK while reaction is playing, but only in "desktop" mode.
|
||||
_animVars.set("headType", (int)IKTarget::Type::Unknown);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue