ensure target mouse entity has equip data

This commit is contained in:
unknown 2018-04-17 16:26:33 -07:00 committed by David Back
parent 3a35fa1c08
commit 4a08a6c147

View file

@ -796,7 +796,8 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
var intersection = Entities.findRayIntersection(pickRay, true);
if (intersection.intersects) {
var entityProperties = Entities.getEntityProperties(intersection.entityID, DISPATCHER_PROPERTIES);
if (entityProperties.parentID === EMPTY_PARENT_ID) {
var hasEquipData = getWearableData(entityProperties).joints || getEquipHotspotsData(entityProperties).length > 0;
if (hasEquipData && entityProperties.parentID === EMPTY_PARENT_ID) {
entityProperties.id = intersection.entityID;
var rightHandPosition = MyAvatar.getJointPosition("RightHand");
var leftHandPosition = MyAvatar.getJointPosition("LeftHand");