Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

aura radius appears to be off by 2.5ft

1531406331

Edited 1531425541
reference with details:&nbsp; <a href="https://app.roll20.net/forum/post/4461349/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/4461349/slug%7D</a> more specifically half a grid size error (we generally use 5ft grid spacing) if 5ft radius is entered on the token , the rendered radius is 7.5ft. It appears to be adding 2.5ft to all radius values entered.
1531407223
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The light or aura is projected from the center of the token and is sized so that it looks like it is outputting from the edges of a circular (or square in the case of a square aura) token. That extra 2.5ft is to account for the radius of a 5ftX5ft token.
1531407391

Edited 1531425458
Yeah so 0ft affects a token but that added 2.5ft doesn't make sense for any radius &gt; 0. I'd add a special case which sets the aura radius to the Math.max(aura radius, half a grid unit), for hex maps do something similar so the minimum aura is a hex for the polygon. here's the relevant source code, I suspect the half grid size error is coming in from r n =&nbsp;Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) the radius used in the canvas arc method context .arc( x,y,r,sAngle,eAngle,counterclockwise ); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drawAuras: function(e) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t, n, i = this.model.collection.page, o = this, r = Math.floor(this.graphic.get("width") / 2), a = (Math.floor(this.graphic.get("height") / 2), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parseFloat(i.get("scale_number"))); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "" != this.model.get("aura1_radius") &amp;&amp; (window.is_gm || this.model.get("showplayers_aura1") || this.model.currentPlayerControls() &amp;&amp; this.model.get("playersedit_aura1")) &amp;&amp; ((t = fabric.Color.fromHex(this.model.get("aura1_color")))._source &amp;&amp; (this.model.get("aura1_square") ? (e.fillStyle = t.setAlpha(.35).toRgba(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.beginPath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (n = Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) &lt; 0 &amp;&amp; (n = 0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.rect(-n, -n, 2 * n, 2 * n), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.closePath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.fill()) : (e.fillStyle = t.setAlpha(.35).toRgba(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.beginPath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (n = Math.floor(parseFloat(o.model.get("aura1_radius")) * window.dpi / a) + r) &lt; 0 &amp;&amp; (n = 0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.arc(0, 0, n, 0, 2 * Math.PI, !0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.closePath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.fill()))); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "" != this.model.get("aura2_radius") &amp;&amp; (window.is_gm || this.model.get("showplayers_aura2") || this.model.currentPlayerControls() &amp;&amp; this.model.get("playersedit_aura2")) &amp;&amp; ((t = fabric.Color.fromHex(this.model.get("aura2_color")))._source &amp;&amp; (this.model.get("aura2_square") ? (e.fillStyle = t.setAlpha(.35).toRgba(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.beginPath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (n = Math.floor(parseFloat(o.model.get("aura2_radius")) * window.dpi / a) + r) &lt; 0 &amp;&amp; (n = 0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.rect(-n, -n, 2 * n, 2 * n), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.closePath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.fill()) : (e.fillStyle = t.setAlpha(.35).toRgba(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.beginPath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (n = Math.floor(parseFloat(o.model.get("aura2_radius")) * window.dpi / a) + r) &lt; 0 &amp;&amp; (n = 0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.arc(0, 0, n, 0, 2 * Math.PI, !0), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.closePath(), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.fill()))) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },
Hi everyone! I have appended this information to the existing ticket for the devs so they can better investigate. Thank you!