Some more updates to the usability of positioning blocks.
When the drag is reverted the ghost animates to its original position. The animation used to snap to a grid which is absolutely nasty. I wish I had a GIF for you.
Clicking near the centroid of a block drags it, further out rotates it. I’ll need to communicate this better. I imagined concentric circles identifying the hit areas but mouse icons will be easiest.
Blocks can rotate into a collision, resulting in invalid layouts. I’m not using a ghost for rotations (maybe I should?) but I use the same red to indicate a collision and revert to the original rotation if the mouse is released while colliding.
Glad I wrote here. That makes me think maybe using a ghost for the rotation would feel better. More consistent, too. Would it feel better? Would it be weird to have two mirrors or lenses on the same spot?
Ooh, actually, I think I want to keep it the way it is. Rotating mirrors to get the laser beams to hit a target across the room is going to be finicky no matter what. Better to have that update live with the rotation.
I’ll have to make sure sensors can’t be activated while blocks are being positioned. Otherwise players could complete a level by holding the mouse down with a block in an invalid position. Neat. A problem for later.
I’m going to need to decide how laser beams respond to blocks that are in the middle of being dragged as well. Right now, I think both the ghost and the original block are going to respond to laser beams and that’s not gonna fly. The block that was dragged should be highlighted somehow, too.
Later.
Okay, this is gross but hang with me, I’m tryna figure out how custom mouse cursors work.
I think after this I better clean up my code. Getting a little spaghetti. The lines between Block and DragAndDrop are blurred and there’s some duplicated code.