#3 Drag and Drop


Assigning a space


I started working on the first mechanic of the game. To drag and drop a person in place.

As you can see, my first attempt wasn't quite right. The person should only be able to move in the x and z direction, and not in the y direction. Ideally, when you would click on someone, they would get selected. When you drag them they would move a bit up in the air, and when you deselect them they would get dropped again. So let's implement that!

That works much better now. What I need to do now is make it so that the people only be able to placed at the seats and the waiting line. So make it snap to a space when you let go of the mouse. Let's do that now.

That seems to be working alright, I might tweak the collision areas a bit more, but the fundamentals are here. You can drag and drop someone on a seat, and they will snap into place. They will return if not dropped on as correct spot. They will also switch places when dropped onto someone else.

I think I will increase the radius of the spaces, make them change color when they are selected, and only make them visible when dragging and dropping. I will implement this later.

Let's focus next on displaying the wishes of the selected person with some UI.

Leave a comment

Log in with itch.io to leave a comment.