drwhut / tabletop-club

An open-source platform for playing tabletop games in a physics-based 3D environment for Windows, macOS, and Linux! Made with the Godot Engine.
MIT License
1.24k stars 49 forks source link

Slide an object with mouse #306

Closed GrimPixel closed 10 months ago

GrimPixel commented 10 months ago

Is your feature request related to a problem? Please describe. There are some games where objects need to be slided, like 15-puzzle and klotski.

Describe the solution you'd like Add an optional behaviour of sliding an object with mouse.

drwhut commented 10 months ago

Could you give detailed examples of why in these games these objects need to be slid, rather than grabbed and re-positioned? Would the flick tool be a suitable workaround in these instances?

GrimPixel commented 10 months ago

When playing these games, the blocks inside the frames are not supposed to be moved out of the frames. Magnetic forces are used to guaratee the stability of block movements. https://www.youtube.com/watch?v=c4P62cFu9Os https://www.youtube.com/watch?v=F9n2FPoWg-I

drwhut commented 10 months ago

I see - this is kind of already possible with the current cursor tool, the only requirement is that you would first have to set the hovering height with the scroll wheel with the first piece that you pick up. Every piece that you pick up after should hover at the same height (that is, the height the piece was already at before it was picked up).

GrimPixel commented 10 months ago

Setting the lift height is working. I think it's the solution. I just don't have a frame model and blocks with fillets to test if everything works well.