Issue picking up a portion of gltf and moving

Above is the playground I created for my issue. If I manually increase the y it moves the piece. But for mouse move taking diff and moving is not working. Sometimes x diff works for the y position and not the y position as such. Any help experts ?.

Setting as below moves when manually set…
keyRoot.keyBottom.position.y = 8
keyRoot.keyTop.position.y = 8


I am note sure that I understand what you are doing there. As far as I see in the code, your function will work only sometimes.
Could you explain in simple words what you are trying to achieve with your example in a way that other people could be able to understand you needs?

Sure I want to pull out the center knob out and when the same is out of the key I want trigger an alarm.

As a human, I understand you. As a developer - don’t :slight_smile:
You need to define some logic for pointer actions and be aware that onpointerMove will work on any move.
Another solution is just make a slider to move the knob up and down with it’s help.

Can also try letting DraggingBehavior do some of the work for you, maybe like this for a quick example. :slight_smile:


@Blake You are awesome man. I love coding in Babylon because guys like you…