Skip to content
Snippets Groups Projects
Commit dbc9387f authored by joni's avatar joni
Browse files

Check el grabbed state

parent 0ff01702
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,9 @@ AFRAME.registerComponent("sticky-object", {
_onRelease(evt) {
if (
!this.el.is("grabbed") &&
this.data.autoLockOnRelease &&
this.el.body.velocity.lengthSquared() < this.data.autoLockSpeedLimit * this.data.autoLockSpeedLimit &&
evt.detail.target.components.grabbable.grabbers.length === 0
this.el.body.velocity.lengthSquared() < this.data.autoLockSpeedLimit * this.data.autoLockSpeedLimit
) {
this.setLocked(true);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment