Bug with VBL for tokens when rotating

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
Calypso
Kobold
Posts: 19
Joined: Sun Dec 09, 2018 8:59 pm

Bug with VBL for tokens when rotating

Post by Calypso »

I'm trying to create doors, and it works as long as the token is horizontally rotated, but when it's rotated the VBL shifts at weird angles and ends up offset. It effectively doesn't work. I've attached a few screenshots showing the issue.

But when I do the same thing with a statue or table, the VBL rotates like I expect it to. Ideas?
Attachments
Screen Shot 2018-12-09 at 9.08.19 PM.png
Screen Shot 2018-12-09 at 9.08.19 PM.png (38.33 KiB) Viewed 5748 times
Screen Shot 2018-12-09 at 9.05.42 PM.png
Screen Shot 2018-12-09 at 9.05.42 PM.png (28.86 KiB) Viewed 5748 times
Screen Shot 2018-12-09 at 9.05.30 PM.png
Screen Shot 2018-12-09 at 9.05.30 PM.png (42.28 KiB) Viewed 5748 times

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Bug with VBL for tokens when rotating

Post by aliasmask »

Looks like some bad math somewhere. But I've never had trouble with rotating doors. Which version of MapTool are you using?

https://www.youtube.com/watch?v=XNaWERrQbgk

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Bug with VBL for tokens when rotating

Post by Jagged »

I think there "might" be issues with the vbl mapping when the image has been flipped; which is something you often want to do with doors.

So probably worth checking that.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Bug with VBL for tokens when rotating

Post by aliasmask »

I was thinking it may have something to do if the token was rotated first then the vbl applied. Just spit ball'n. I know trying to resize a token in free size when rotated gets really wonky.

Calypso
Kobold
Posts: 19
Joined: Sun Dec 09, 2018 8:59 pm

Re: Bug with VBL for tokens when rotating

Post by Calypso »

I'm using 1.4.1.8.

I just went back and tried it on an unflipped, unrotated door (fresh from my library) and observed the same behavior. The VBL mask is correct at 0 degrees and 180 degrees, but as you rotate it between those, it gets out of wack. It looks like a math error that is only really obvious on very asymmetric objects.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Bug with VBL for tokens when rotating

Post by aliasmask »

Can you post your image and the exact method you're using. Here is a demo of me doing it.

https://youtu.be/mqcY7wvT4wk

Calypso
Kobold
Posts: 19
Joined: Sun Dec 09, 2018 8:59 pm

Re: Bug with VBL for tokens when rotating

Post by Calypso »

Sure. I've attached an example door image (Doors and Windows by Bogie) that suffers from the problem described. Here is the process:

1) Select the "Token" layer (though same behavior for other layers)
2) Navigate to the desired door in the Resource Explorer
3) Double click door to bring up Edit Token dialogue
4) Click VBL tab
5) Change sensitivity to 1 and leave visibility tolerance at 2
6) Click Generate VBL and accept dialogue
7) Click OK
8.) Hold shift and mouse wheel up (or choose Set Facing) and set the door to a 45 degree angle
9) Click VBL Layer tool icon on toolbar
10) Note yellow VBL mask at a different angle than door (and skewed oddly)

You know, now that I look at it, I think it's because the image is not square. It's 200x12. When I change the token size to "Native", it behaves as expected. Unfortunately, this is not useful since it makes the door way too big to be useful.
Attachments
Door-Bronze-2-10ft_fb_bg.png
Door-Bronze-2-10ft_fb_bg.png (5.97 KiB) Viewed 5717 times

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Bug with VBL for tokens when rotating

Post by taustinoc »

In my experience, things that pivot (like doors) work best if they're square, and the point around which the image should pivot is the exact center. For a standard door, this means the image is at least twice as wide as the width of the door, with lots of blank (transparent) space, but once you place it, it pivots very intuitively.

No idea if that will help with the issue you're having.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Bug with VBL for tokens when rotating

Post by aliasmask »

I was able to duplicate the error. I think it has something to do with the native size vs token footprint size where the wrong value it being used. Yes, you can use the native size to fix the issue. You can then resize it on the object layer to have it work correctly. You can probably even make a macro to size it rather than relying on eye-ball'n it. Personally, I would just re-edit the image to make it square.

Post Reply

Return to “MapTool 1.4”