Drag-Game-Builder

In the Github Armory examples I’ve found a code on how to drag objects - but in this case these cubes are linked to physical constraints. I took the source code and deleted the “mouse_release” - section. But this was a try-n-error attempt instead of knowing what I’m doing.

I would like to have a game where I can drag the cube to the mouse-cursor position and finally the cube should stand at this postion without any physical behaviour. Is there any node-setup or code example?

Sum up: cursor position = object position
https://github.com/armory3d/armory_examples/tree/master/physics_drag

drag

you want your cube to be like the video?
sorry i did not understand what you wanted

1 Like

Yes :slight_smile:
Like in the video. I’m sorry OBS didn’t record the cursor.

In the armory example you can drag the cube by clicking on them and throw it away by releasing the mouse button, due to rigid body physics. The cube always falls to the ground.

But I need the same method without throwing the cube away. The cube should stand where I release the mouse button, without any physics-constraints.

Thanks for the reply!:+1:t3:

I tried to cancel the mouse.released section. This works but only one time after draging the cube once.