mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
avoid bad interaction between far-grab and equip
This commit is contained in:
parent
dfa949f2d8
commit
87ea9161e4
1 changed files with 2 additions and 2 deletions
|
@ -2040,8 +2040,8 @@ function MyController(hand) {
|
|||
this.ensureDynamic = function() {
|
||||
// if we distance hold something and keep it very still before releasing it, it ends up
|
||||
// non-dynamic in bullet. If it's too still, give it a little bounce so it will fall.
|
||||
var props = Entities.getEntityProperties(this.grabbedEntity, ["velocity", "dynamic"]);
|
||||
if (props.dynamic) {
|
||||
var props = Entities.getEntityProperties(this.grabbedEntity, ["velocity", "dynamic", "parentID"]);
|
||||
if (props.dynamic && props.parentID == NULL_UUID) {
|
||||
var velocity = props.velocity;
|
||||
if (Vec3.length(velocity) < 0.05) { // see EntityMotionState.cpp DYNAMIC_LINEAR_VELOCITY_THRESHOLD
|
||||
velocity = { x: 0.0, y: 0.2, z:0.0 };
|
||||
|
|
Loading…
Reference in a new issue