RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
789 stars 259 forks source link

Add center of rotation to the token layout panel #1447

Open Merudo opened 4 years ago

Merudo commented 4 years ago

Is your feature request related to a problem? Please describe. A number of tokens should have their center of rotation set away from their center. For example, doors should rotate at their hinges and cranes at their base.

Currently, it is not possible to change the center of rotation of a token. Instead, users have to follow one of two workarounds:

1) use the layout x and y offsets to align the token so its center of rotation is at the center of the layout. However, the token then becomes weirdly aligned on the grid, so the token needs to be aligned manually by turning off snap to grid.

2) manually add transparent pixels to the image of every rotating tokens, so that their center of rotation is at the right place.

Neither of these solutions is straightforward or desirable.

Describe the solution you'd like An extra control on the layout panel to set up the token's center of rotation.

Phergus commented 4 years ago

We talked about this a lot years ago but it never really bubbled up in priority.

One of the issues is what exactly happens when you rotate an object but the rotation center is over on one side? Does the image rotate out of the footprint or does the footprint now center on the rotation point? So if we have a door object (snapped-to-grid because you mentioned it) but you want the rotation to be over at the hinge: DoorObject

Is this the goal? DoorObjectOpen

Or this? DoorObjectOpenCenter

JamzTheMan commented 4 years ago

Why are your doors snap to grid? :)

Regardless, probably number 1.

I always thought it would be nice to add modifier keys to change rotation as well.

Phergus commented 4 years ago

He's the one that has snap-to-grid doors. I would never do that. :p

So what about actual tokens (aka PCs & NPCs)? Currently 2-cell critters are pretty clunky as the token selection box is stupidly square instead of being just the image size (or better would be the footprint size).

Token on left. Object on right Object Vs Token

The biggest problem with the current token positioning in the config panel is doing it with larger than single-cell entities or objects.

Merudo commented 4 years ago

I don't know what's the big taboo regarding doors with snap-to-grid. Sure it doesn't work now, but if the "center of rotation" is implemented it would be perfect.

My idea would be to have a dot on the layout panel representing the center of rotation. For example, both of the door pictures would be possible:

door1

door2

JamzTheMan commented 4 years ago

Since this just came up....

Research needs to be done if this issue is worked on. For Visible over FoW checks as well as canSeeToken macro. If that door is rotated outside it's footprint, how does that affect visibility checks to that token

bubblobill commented 4 years ago

The fiddliest bit about setting door hinge points is the layout panel is teency weency and doesn't resize. Adding a tiny dot would not be any use without a larger UI.

JamzTheMan commented 4 years ago

The UI could be updated. Perhaps a new tab is needed.

FullBleed commented 2 years ago

We need this.