Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cone vision shape produces incorrect personal light radius #257

Closed
Phergus opened this issue Feb 23, 2019 · 6 comments · Fixed by #4803
Closed

Cone vision shape produces incorrect personal light radius #257

Phergus opened this issue Feb 23, 2019 · 6 comments · Fixed by #4803
Assignees
Labels
bug low Low priority bug/enhancement up for grabs Minimal context and are well-suited for new contributors

Comments

@Phergus
Copy link
Contributor

Phergus commented Feb 23, 2019

Shows in MT 1.4.0.5, 1.4.1.8 & 1.5.0.1
ConeVisionTest1405.cmpgn.zip
MT 1.4.0.5 campaign file for testing.

Setting a vision type to cone shape appears to cause the personal light radius value to be a minimum of 1 within the area of the cone and a full square grid cell outside the cone.

With a x2 multiplier and a personal radius of 0.25, expect to get a vision radius of 2 * 0.25 = 0.5.

Lowlight Circle: circle x2 r0.25
Produces the expected:
circlex2r25

Lowlight Cone: cone arc=120 x2 r0.25
Produces a radius of 1 and appears to force a blocky vision shape.
conex2r25

Lowlight C2: cone arc=120 x2 r1
Works as expected with a smooth cone curve.
conex2r1

@JamzTheMan JamzTheMan added bug low Low priority bug/enhancement 3 labels Feb 26, 2019
@JamzTheMan JamzTheMan added the up for grabs Minimal context and are well-suited for new contributors label Mar 16, 2019
@JamzTheMan JamzTheMan removed the 3 label Sep 6, 2019
@amccarthy1
Copy link
Contributor

Did some additional testing on this and found some interesting behavior. If you set the radius to 0.6, you get this weird shape:
image

But if you remove the code that adds the token footprint to the vision shape, it renders the expected shape of just an arc in front of the character.
image

Doing the reverse (displaying only the footprint) also seems to work fine. So either something is going wrong with the java Shape class when adding these (seems unlikely?) or something above the getShapedArea call is messing this up.

@emmebi
Copy link
Collaborator

emmebi commented Mar 1, 2020

@amccarthy1 good catch. If you keep working on this, you could have it assigned to you.

@Phergus
Copy link
Contributor Author

Phergus commented Mar 1, 2020

Good info.

Important Note: One of the intents of personal light was to make it so a player can always see their token even if their token doesn't have some type of night vision. The rationale being that a person would have some notion of their immediate surroundings by touch if nothing else.

@Jmr3366
Copy link
Contributor

Jmr3366 commented Sep 17, 2022

I can't load this campaign and attempting to follow along, I don't know this issue exists.
Can this be tested or share exactly what you have in sight and light, so it can be tested?

@Phergus
Copy link
Contributor Author

Phergus commented Sep 17, 2022

Yes, the issue still exists and all of the sight definitions were provided above in the comments but here are the relevant ones:

Conic Lowlight P1: cone arc=120 x2 r1 
Conic Lowlight P0.6: cone arc=120 x2 r0.6 
Conic Lowlight P0.25: cone arc=120 x2 r0.25 

@Phergus
Copy link
Contributor Author

Phergus commented Sep 18, 2022

Here is a campaign file from MT v1.11.5 with map with tokens using the 3 sight types. Remove the .zip.
ConeVisionTest1_11_5.cmpgn.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low Low priority bug/enhancement up for grabs Minimal context and are well-suited for new contributors
Projects
Status: Merged
Development

Successfully merging a pull request may close this issue.

6 participants