Separating the "move camera" and "select item" controls

The way the controls work in Stonehearth is simple and beautiful. I do have a single complaint, though: the left mouse button is used both to move the camera and select items (like beds or fences). This isn’t the heart of the problem, though.

The problem is that to unselect an item, you click on the world or on something else. This makes it impossible to pan the camera when you want to, for instance, place a bed.

There are multiple ways to solve this problem. My suggestion is to make panning the camera use the middle mouse button (but this would be problematic for people using a trackpad or without any scroll wheel) (also, middle mouse button seems to make more sense if it rotates, and the right mouse button panning, but that’s not the important part). Another way is to make you unable to unselect the item if you’re placing it.

These are the two things I’ve thought of, but if you have any other ideas, please reply!


@SteveAdamo or @Geoffers747 I think you might want to move this to this thread.

well, normally… yes… :wink:

but this is a specifically thought out suggestion on altering the camera controls… as opposed to a general “post your ideas here!” thread, like was recently merged…

this one should be ok to stand on its own… :+1:

That’s what I was thinking.

Some more ideas…

  • If/when edge of screen scrolling is implemented, this becomes less of a problem. So if it’s not on the books yet, this is one way to fix the problem, though not a very good one. You won’t be able to rotate around, but you’ll be able to move the screen where you want it.
  • On-screen “place” button. After plopping the item down somewhere, the camera controls return to your mouse, but the item remains in blueprint mode with a little “place” or approve button hovering over it. This allows you to move the camera without finalizing object placement. Then you can pick up your blueprint again, rotate or move or do whatever you want, and when it’s just where you want it, hit the button, and your little villagers run to place it for you.

I would like it if they change the camera controls too. Most of the games (as far as I know) use WASD (XZ for zooming in and out in those cases) for most of the games. It might be good if they change the camera controls to WASDXZ in this case, really had a bad time to get used to the whole dragging thing. :stuck_out_tongue:

I agree. My right wrist tends to bother me quite a bit and the less clicking and dragging I have to do the better. :frowning:

1 Like

Pressing the Escape button worked for me when I needed some “unselecting”

But the idea is to not unselect when pressing “click”, not how to unselect.

And actually, removing the “unselect when click” feature and requiring the pressing of Escape to unselect would solve this problem.

(On a somewhat related note, it would be nice if Escape made you leave all interfaces.)

Aex, sorry if I’m repeating what you said but…

We don’t want to ‘unselect’. We want to be able to move the camera around while an item is selected so we can see and better place that item.

I feel like for this we’d need to have the standard keyboard movement enabled. Sure, changing the camera angle and depth of view should be done with the mouse, but settling buildings and objects while selecting an item? I’d desperately need the inclusion of my keyboard to make that a bit easier. Plus, as an old RTS player, I’m used to the keyboard being a part of my movement.

Sorry, I scanned too quickly through the thread (wanted to clean out my notifications of unread/new threads) I do agree though, I’ve had some nasty situations when I couldn’t make my stockpile the size I wanted ^^

I also have to say that it’s very annoying that when you click on Stockpile, Carpenter, Simple Room, Walls etc. you are not able to move anymore with your camera until you unselect. This is at my part very annoying.

So, this seems to be solved now with the spacebar-mouse movement.

But I’ve to admit that I’m not quiet happy with this. Now to move more than a small step, you have to “hold spacebar, move mouse, release spacebar, move mouse back, repeat…”. Also I’d prefer to be able to mouse move the camera with only the mouse.
May be add alternate camera movement like it was before, but only if both mouse buttons are pressed?

Hmmm. I wonder if I can get the screen resolution somewhere.

Your best hope is to see if you can use window or document via js probably. There’s probably some kind of call via radiant as well that will do it that has no usage or documentation at all.

The “main” issue is that it’s required on the lua side, although getting that over isn’t too much of a big deal. Maybe after I’ve added that pattern thing to rp_alternate_naming I can have a look. In the best case, the mouse position would have a field that’s [0, 1], but I’m not getting my hopes up :smile:

I tried to check but I can’t figure out how to get rp.log working, I tried going straight via as well.

In JS, it should be simply using rp.log("my", "strings") (which has to be done after RP has been initialized, otherwise the calls end up nowhere… I believe). So a test would be'rp:init_server').done(function() { rp.log(...); });.

It’s an un-neat detail that will hopefully be ruled out when I introduce'rp:init_mod').

I tried to patch them into _gotoFinishStep of TiM if that matters. I wasn’t sure if the screen settings would be correct straight after the server is started.

@RepeatPan I got it working somewhat. Every method I could find reported the screen size as 1920x1080 no matter what, however I noticed something because I was recording mouse location at the same time. It scales the game, the game is treated as a 1920x1080 screen and all mouse positions reflect that. If you click just next to the right edge it will always report your click as like 1070+ for x even if the window is only a few hundred pixels wide. So you technically don’t need to get screen size - but it’s probably best to anyway - all you have to do is have it trigger. I’m currently attempting to patch the camera hotfix to do that in fact.