blish-hud / Community-Module-Pack

MIT License
5 stars 25 forks source link

Rotate behavior should still apply if the value provided is 0. #84

Closed dlamkins closed 3 years ago

dlamkins commented 5 years ago

Per QuitarHero:

The defualt behavior of the rotate attribute is if you, for example, have rotate-x="0", it pretends that the attribute wasn't specified and retains the normal marker behavior of always facing you. But sometimes it's nice to have rotate-x="0" to have a marker that can only be seen by looking up at it. An easy workaround is rotate-x="0.01" (or any small number) which barely moves it, but it'd be cool if the default functionality is, if the attribute is specified, even if it's 0, it forces the marker to abide by the rotate behavior.

I agree. If any of the rotate attributes are added, the rotation should be forced to be static.

REF: https://discordapp.com/channels/531175899588984842/534490472224391169/601049435635712009

dlamkins commented 5 years ago

Currently Entities have a Rotation property on them. Markers default to billboarding unless it detects that the current Rotation is not Vector2.Zero and this is why we're seeing the behavior we are. I think once Behaviors are singletons, this will be easier to resolve (separate "Billboarding" out into its own behavior that doesn't activate unless nothing else is there to set the rotation).

dlamkins commented 3 years ago

This has been resolved in the new Pathing module. Rotation is a nullable so we know when we have assigned a value and when we have not.