mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-16 15:50:55 +02:00
don't crash when watching someone else near-grab something
This commit is contained in:
parent
3df5d0abad
commit
e1b10e79df
1 changed files with 6 additions and 4 deletions
|
@ -111,11 +111,13 @@ std::shared_ptr<Avatar> AvatarActionHold::getTarget(glm::quat& rotation, glm::ve
|
|||
|
||||
PalmData palmData = holdingAvatar->getHand()->getCopyOfPalmData(isRightHand ? HandData::RightHand : HandData::LeftHand);
|
||||
|
||||
// TODO: adjust according to _relativePosition and _relativeRotation?
|
||||
linearVelocity = palmData.getVelocity();
|
||||
angularVelocity = palmData.getAngularVelocity();
|
||||
if (palmData.isValid()) {
|
||||
// TODO: adjust according to _relativePosition and _relativeRotation?
|
||||
linearVelocity = palmData.getVelocity();
|
||||
angularVelocity = palmData.getAngularVelocity();
|
||||
}
|
||||
|
||||
if (_ignoreIK && holdingAvatar->isMyAvatar()) {
|
||||
if (_ignoreIK && holdingAvatar->isMyAvatar() && palmData.isValid()) {
|
||||
// We cannot ignore other avatars IK and this is not the point of this option
|
||||
// This is meant to make the grabbing behavior more reactive.
|
||||
palmPosition = palmData.getPosition();
|
||||
|
|
Loading…
Reference in a new issue