aframe-click-drag-component
aframe-click-drag-component copied to clipboard
Not able to click and drag an entity made up of other entities
@jesstelford @ngokevin I have created a dice entity from six plane entities. However, when I click and drag the dice entity, instead of moving that dice, only one sided face gets dragged. This can be tried hands on at link http://shrouded-chamber-73425.herokuapp.com/
Any news regarding this issue?
It does not work actually
I got round it with this
setAttributeFamily(el,'click-drag',true)
function setAttributeFamily(el,attribute,value){
el.setAttribute(attribute,value)
const children = [].slice.call(el.children)
children.forEach((child)=> child.setAttribute(attribute, value))
if(el.parentNode.classList.contains('hotspot'))
el.parentNode.setAttribute(attribute, value)
}