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

Make vecdraw:SCALE work only on :VECTOR, not :START #1200

Closed
Dunbaratu opened this issue Oct 19, 2015 · 10 comments
Closed

Make vecdraw:SCALE work only on :VECTOR, not :START #1200

Dunbaratu opened this issue Oct 19, 2015 · 10 comments
Assignees
Labels
bug Weird outcome is probably not what the mod programmer expected. enhancement Something new (not a bug fix) is being requested

Comments

@Dunbaratu
Copy link
Member

(I've known this was wrong for a while but thought it was too late to fix it because it had been in public use. But now I think it's impossible to use it anyway the way it is now so nobody has been using it. Users keep giving each other advice of "leave this at 1, don't change it because it messes up" and I suspect nobody is using it at all. Which makes it okay to change it to something more sane.)

What it does now: When you change the :SCALE of a vecdraw, it multiplies the scale by BOTH the :START and the :VEC vectors, causing the vector to not only get bigger, as expected, but also to change where the tail is drawn, which isn't expected.

Proper behavior: Just use :SCALE on the :VEC only, not the :START position.

@space-is-hard
Copy link
Member

I'm no vector expert, but I've never come across a situation where the current implementation of :SCALE has been useful anyways.

+1

@hvacengi
Copy link
Member

Agreed. As is, I just multiply the vector by my scale factor, and leave the specified scale factor set to 1. I think the current implementation is only useful if you are trying to visualize how vectors stack together (or instance current velocity plus delta v) at a larger scale.

@ozin370
Copy link

ozin370 commented Oct 25, 2015

I highly support this change. When I started using vecdraws and tried to use the scale param to adjust the vector scale, it really confused me and I thought I was doing something wrong.

@ozin370
Copy link

ozin370 commented Oct 26, 2015

Actually, come to think of it.. it would be great if scale could be changed into thickness. Depending on circumstances, vecdraws are often too thin or thick compared to the length, sometimes making them a bit useless.

@Dunbaratu Dunbaratu added bug Weird outcome is probably not what the mod programmer expected. enhancement Something new (not a bug fix) is being requested labels Dec 29, 2015
@Dunbaratu
Copy link
Member Author

Sort of halfway between bug and enhancement. Although the current behavior is consistent, it's consistently stupid and useless. I think it needs fixing.

@Dunbaratu Dunbaratu self-assigned this Dec 29, 2015
@Dunbaratu
Copy link
Member Author

I like the idea of a width, but not for the scale value because that would mess things up in existing scripts.

@Dunbaratu
Copy link
Member Author

Whoa.. there already IS a :width suffix, but it's totally undocumented. I forgot all about it.

@ozin370
Copy link

ozin370 commented Dec 31, 2015

Hah! Good to know

@Dunbaratu
Copy link
Member Author

My PR above documents :WIDTH, as well as implementing some new rules for how scaling works. I'm hoping it's entirely compatible with existing scripts, except for the rare exception where someone actually used both :SCALE and a nonzero :START location, which I'm thinking is going to be super super rare because that's exactly the situation that made this previous type of scaling so broken.

@Dunbaratu
Copy link
Member Author

Warning, if you start using :width now, before my pull request above becomes public, you'll be using a system that's about to change its interpretation slightly. I figured it was safe to change how it works given that it wasn't officially promised before (by not being documented).

erendrake added a commit that referenced this issue Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Weird outcome is probably not what the mod programmer expected. enhancement Something new (not a bug fix) is being requested
Projects
None yet
Development

No branches or pull requests

4 participants