mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 13:20:12 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into attenuation_zones
This commit is contained in:
commit
4fd6094ea4
4 changed files with 49 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
The project embraces distributed development and if you'd like to help, we'll pay you -- find out more at Worklist.net. If you find a small bug and have a fix, pull requests are welcome. If you'd like to get paid for your work, make sure you report the bug via a job on Worklist.net.
|
||||
The project embraces distributed development and if you'd like to help, we'll pay you -- find out more at [Worklist.net](https://worklist.net). If you find a small bug and have a fix, pull requests are welcome. If you'd like to get paid for your work, make sure you report the bug via a job on Worklist.net.
|
||||
|
||||
We're hiring! We're looking for skilled developers; send your resume to hiring@highfidelity.io
|
||||
|
||||
|
@ -16,7 +16,7 @@ Contributing
|
|||
git checkout -b new_branch_name
|
||||
```
|
||||
4. Code
|
||||
* Follow the [coding standard](https://github.com/highfidelity/hifi/wiki/Coding-Standard)
|
||||
* Follow the [coding standard](http://docs.highfidelity.io/v1.0/docs/coding-standard)
|
||||
5. Commit
|
||||
* Use [well formed commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
||||
6. Update your branch
|
||||
|
@ -38,11 +38,11 @@ Contributing
|
|||
|
||||
Reporting Bugs
|
||||
===
|
||||
1. Always update to the latest code on master, it is possible the bug has already been fixed!
|
||||
2. Search the [repository issues](https://github.com/highfidelity/hifi/issues) to make sure that somebody has not already reported the same bug.
|
||||
3. Open an [issue on GitHub](https://github.com/highfidelity/hifi/issues) including information about your system and how to reproduce the bug.
|
||||
1. Always update to the latest code on master, we make many merges every day and it is possible the bug has already been fixed!
|
||||
2. Search jobs [on Worklist](https://worklist.net) to make sure that somebody has not already reported the same bug.
|
||||
3. Add a [job on Worklist](https://worklist.net/job/add) including information about your system and how to reproduce the bug.
|
||||
|
||||
Requesting a feature
|
||||
===
|
||||
1. Search the [repository issues](https://github.com/highfidelity/hifi/issues) to make sure that somebody has not already requested the same feature. If you find a matching request, feel free to add any additional comments to the existing issue.
|
||||
2. Submit an [issue on GitHub](https://github.com/highfidelity/hifi/issues) that is tagged as a feature.
|
||||
1. Search the [the Worklist](https://worklist.net) to make sure that somebody has not already requested the same feature. If you find a matching request, feel free to add any additional comments to the existing issue.
|
||||
2. Add a [job on Worklist](https://worklist.net/job/add) that is labeled as a Feature (and select any other appropriate Labels) and includes a detailed description of your request.
|
||||
|
|
|
@ -3,10 +3,10 @@ lab experimenting with Virtual Worlds and VR.
|
|||
|
||||
In this repository you'll find the source to many of the components in our
|
||||
alpha-stage virtual world. The project embraces distributed development
|
||||
and if you'd like to help, we'll pay you -- find out more at Worklist.net.
|
||||
and if you'd like to help, we'll pay you -- find out more at [Worklist.net](https://worklist.net).
|
||||
If you find a small bug and have a fix, pull requests are welcome. If you'd
|
||||
like to get paid for your work, make sure you report the bug via a job on
|
||||
Worklist.net.
|
||||
[Worklist.net](https://worklist.net).
|
||||
|
||||
We're hiring! We're looking for skilled developers;
|
||||
send your resume to hiring@highfidelity.io
|
||||
|
@ -14,6 +14,10 @@ send your resume to hiring@highfidelity.io
|
|||
##### Chat with us
|
||||
Come chat with us in [our Gitter](http://gitter.im/highfidelity/hifi) if you have any questions or just want to say hi!
|
||||
|
||||
Documentation
|
||||
=========
|
||||
Documenation is available at [docs.highfidelity.io](http://docs.highfidelity.io), if something is missing, please suggest it via a new job on Worklist (add to the hifi-docs project).
|
||||
|
||||
Build Instructions
|
||||
=========
|
||||
All information required to build is found in the [build guide](BUILD.md).
|
||||
|
|
|
@ -1215,19 +1215,44 @@ var toolBar = (function () {
|
|||
Overlays.editOverlay(loadFileMenuItem, { visible: active });
|
||||
}
|
||||
|
||||
var RESIZE_INTERVAL = 50;
|
||||
var RESIZE_TIMEOUT = 20000;
|
||||
var RESIZE_MAX_CHECKS = RESIZE_TIMEOUT / RESIZE_INTERVAL;
|
||||
function addModel(url) {
|
||||
var position;
|
||||
|
||||
position = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), SPAWN_DISTANCE));
|
||||
|
||||
if (position.x > 0 && position.y > 0 && position.z > 0) {
|
||||
Entities.addEntity({
|
||||
var entityId = Entities.addEntity({
|
||||
type: "Model",
|
||||
position: position,
|
||||
dimensions: { x: DEFAULT_DIMENSION, y: DEFAULT_DIMENSION, z: DEFAULT_DIMENSION },
|
||||
modelURL: url
|
||||
});
|
||||
print("Model added: " + url);
|
||||
|
||||
var checkCount = 0;
|
||||
function resize() {
|
||||
var entityProperties = Entities.getEntityProperties(entityId);
|
||||
var naturalDimensions = entityProperties.naturalDimensions;
|
||||
|
||||
checkCount++;
|
||||
|
||||
if (naturalDimensions.x == 0 && naturalDimensions.y == 0 && naturalDimensions.z == 0) {
|
||||
if (checkCount < RESIZE_MAX_CHECKS) {
|
||||
Script.setTimeout(resize, RESIZE_INTERVAL);
|
||||
} else {
|
||||
print("Resize failed: timed out waiting for model (" + url + ") to load");
|
||||
}
|
||||
} else {
|
||||
entityProperties.dimensions = naturalDimensions;
|
||||
Entities.editEntity(entityId, entityProperties);
|
||||
}
|
||||
}
|
||||
|
||||
Script.setTimeout(resize, RESIZE_INTERVAL);
|
||||
|
||||
} else {
|
||||
print("Can't add model: Model would be out of bounds.");
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ const float PITCH_SPEED = 100.0f; // degrees/sec
|
|||
const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions
|
||||
const float COLLISION_RADIUS_SCALE = 0.125f;
|
||||
|
||||
const float MIN_KEYBOARD_CONTROL_SPEED = 1.5f;
|
||||
const float MAX_WALKING_SPEED = 3.0f * MIN_KEYBOARD_CONTROL_SPEED;
|
||||
const float MIN_KEYBOARD_CONTROL_SPEED = 0.50f;
|
||||
const float MAX_WALKING_SPEED = 4.5f;
|
||||
|
||||
// TODO: normalize avatar speed for standard avatar size, then scale all motion logic
|
||||
// to properly follow avatar size.
|
||||
|
@ -1262,21 +1262,19 @@ glm::vec3 MyAvatar::applyKeyboardMotor(float deltaTime, const glm::vec3& localVe
|
|||
|
||||
// Compute the target keyboard velocity (which ramps up slowly, and damps very quickly)
|
||||
// the max magnitude of which depends on what we're doing:
|
||||
float finalMaxMotorSpeed = hasFloor ? _scale * MAX_WALKING_SPEED : _scale * MAX_KEYBOARD_MOTOR_SPEED;
|
||||
float motorLength = glm::length(_keyboardMotorVelocity);
|
||||
float finalMaxMotorSpeed = hasFloor ? _scale * MAX_WALKING_SPEED : _scale * MAX_KEYBOARD_MOTOR_SPEED;
|
||||
float speedGrowthTimescale = 2.0f;
|
||||
float speedIncreaseFactor = 1.8f;
|
||||
motorLength *= 1.0f + glm::clamp(deltaTime / speedGrowthTimescale , 0.0f, 1.0f) * speedIncreaseFactor;
|
||||
if (motorLength < _scale * MIN_KEYBOARD_CONTROL_SPEED) {
|
||||
// an active keyboard motor should never be slower than this
|
||||
_keyboardMotorVelocity = _scale * MIN_KEYBOARD_CONTROL_SPEED * direction;
|
||||
motorLength = _scale * MIN_KEYBOARD_CONTROL_SPEED;
|
||||
motorEfficiency = 1.0f;
|
||||
} else {
|
||||
float KEYBOARD_MOTOR_LENGTH_TIMESCALE = 2.0f;
|
||||
float INCREASE_FACTOR = 1.8f;
|
||||
motorLength *= 1.0f + glm::clamp(deltaTime / KEYBOARD_MOTOR_LENGTH_TIMESCALE, 0.0f, 1.0f) * INCREASE_FACTOR;
|
||||
if (motorLength > finalMaxMotorSpeed) {
|
||||
motorLength = finalMaxMotorSpeed;
|
||||
}
|
||||
_keyboardMotorVelocity = motorLength * direction;
|
||||
} else if (motorLength > finalMaxMotorSpeed) {
|
||||
motorLength = finalMaxMotorSpeed;
|
||||
}
|
||||
_keyboardMotorVelocity = motorLength * direction;
|
||||
_isPushing = true;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue