mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-30 00:16:40 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into red
This commit is contained in:
commit
d9cb07bf9a
6 changed files with 15 additions and 6 deletions
|
@ -278,6 +278,12 @@ int64_t AudioInjector::injectNextFrame() {
|
||||||
audioPacketStream.writeRawData(reinterpret_cast<const char*>(&_options.orientation),
|
audioPacketStream.writeRawData(reinterpret_cast<const char*>(&_options.orientation),
|
||||||
sizeof(_options.orientation));
|
sizeof(_options.orientation));
|
||||||
|
|
||||||
|
audioPacketStream.writeRawData(reinterpret_cast<const char*>(&_options.position),
|
||||||
|
sizeof(_options.position));
|
||||||
|
glm::vec3 boxCorner = glm::vec3(0);
|
||||||
|
audioPacketStream.writeRawData(reinterpret_cast<const char*>(&boxCorner),
|
||||||
|
sizeof(glm::vec3));
|
||||||
|
|
||||||
// pack zero for radius
|
// pack zero for radius
|
||||||
float radius = 0;
|
float radius = 0;
|
||||||
audioPacketStream << radius;
|
audioPacketStream << radius;
|
||||||
|
|
|
@ -78,7 +78,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
case PacketType::MicrophoneAudioNoEcho:
|
case PacketType::MicrophoneAudioNoEcho:
|
||||||
case PacketType::MicrophoneAudioWithEcho:
|
case PacketType::MicrophoneAudioWithEcho:
|
||||||
case PacketType::AudioStreamStats:
|
case PacketType::AudioStreamStats:
|
||||||
return static_cast<PacketVersion>(AudioVersion::TerminatingStreamStats);
|
return static_cast<PacketVersion>(AudioVersion::SpaceBubbleChanges);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 17;
|
return 17;
|
||||||
|
|
|
@ -234,6 +234,7 @@ enum class AudioVersion : PacketVersion {
|
||||||
CodecNameInAudioPackets,
|
CodecNameInAudioPackets,
|
||||||
Exactly10msAudioPackets,
|
Exactly10msAudioPackets,
|
||||||
TerminatingStreamStats,
|
TerminatingStreamStats,
|
||||||
|
SpaceBubbleChanges,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_PacketHeaders_h
|
#endif // hifi_PacketHeaders_h
|
||||||
|
|
BIN
scripts/system/assets/models/Bubble-v14.fbx
Normal file
BIN
scripts/system/assets/models/Bubble-v14.fbx
Normal file
Binary file not shown.
Binary file not shown.
|
@ -23,11 +23,13 @@
|
||||||
var bubbleButtonFlashState = false;
|
var bubbleButtonFlashState = false;
|
||||||
// Used for flashing the HUD button upon activation
|
// Used for flashing the HUD button upon activation
|
||||||
var bubbleButtonTimestamp;
|
var bubbleButtonTimestamp;
|
||||||
|
// Affects bubble height
|
||||||
|
const BUBBLE_HEIGHT_SCALE = 0.15;
|
||||||
// The bubble model itself
|
// The bubble model itself
|
||||||
var bubbleOverlay = Overlays.addOverlay("model", {
|
var bubbleOverlay = Overlays.addOverlay("model", {
|
||||||
url: Script.resolvePath("assets/models/bubble-v12.fbx"), // If you'd like to change the model, modify this line (and the dimensions below)
|
url: Script.resolvePath("assets/models/Bubble-v14.fbx"), // If you'd like to change the model, modify this line (and the dimensions below)
|
||||||
dimensions: { x: 1.0, y: 0.75, z: 1.0 },
|
dimensions: { x: 1.0, y: 0.75, z: 1.0 },
|
||||||
position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28, z: MyAvatar.position.z },
|
position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z },
|
||||||
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
||||||
scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 },
|
scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 },
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -71,7 +73,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Overlays.editOverlay(bubbleOverlay, {
|
Overlays.editOverlay(bubbleOverlay, {
|
||||||
position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28, z: MyAvatar.position.z },
|
position: { x: MyAvatar.position.x, y: -MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE, z: MyAvatar.position.z },
|
||||||
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
||||||
scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 },
|
scale: { x: 2, y: MyAvatar.scale * 0.5 + 0.5, z: 2 },
|
||||||
visible: true
|
visible: true
|
||||||
|
@ -112,7 +114,7 @@
|
||||||
// Quickly raise the bubble from the ground up
|
// Quickly raise the bubble from the ground up
|
||||||
position: {
|
position: {
|
||||||
x: MyAvatar.position.x,
|
x: MyAvatar.position.x,
|
||||||
y: (-((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * 0.28,
|
y: (-((BUBBLE_RAISE_ANIMATION_DURATION_MS - delay) / BUBBLE_RAISE_ANIMATION_DURATION_MS)) * MyAvatar.scale * 2 + MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE,
|
||||||
z: MyAvatar.position.z
|
z: MyAvatar.position.z
|
||||||
},
|
},
|
||||||
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
||||||
|
@ -127,7 +129,7 @@
|
||||||
Overlays.editOverlay(bubbleOverlay, {
|
Overlays.editOverlay(bubbleOverlay, {
|
||||||
position: {
|
position: {
|
||||||
x: MyAvatar.position.x,
|
x: MyAvatar.position.x,
|
||||||
y: MyAvatar.position.y + MyAvatar.scale * 0.28,
|
y: MyAvatar.position.y + MyAvatar.scale * BUBBLE_HEIGHT_SCALE,
|
||||||
z: MyAvatar.position.z
|
z: MyAvatar.position.z
|
||||||
},
|
},
|
||||||
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
rotation: Quat.fromPitchYawRollDegrees(MyAvatar.bodyPitch, 0, MyAvatar.bodyRoll),
|
||||||
|
|
Loading…
Reference in a new issue