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

'Angles' property is not used when rotating. #3827

Closed
tanukibouwer opened this issue May 22, 2021 · 6 comments · Fixed by #3977
Closed

'Angles' property is not used when rotating. #3827

tanukibouwer opened this issue May 22, 2021 · 6 comments · Fixed by #3977
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Milestone

Comments

@tanukibouwer
Copy link
Contributor

System Information

TrenchBroom master branch at commit b9a6371 on Linux KDE Neon

Expected Behavior

With an entity which has a property called angles with type String (and a .obj file as model) defined like this:

@PointClass model("models/bus.obj") = angles_test[
	angles(string) : "Angles (x y z)" : "0 0 0"
]

When rotating the entity in TrenchBroom, it should have rotation enabled on all axes and should edit the angles property, regardless of whether the angles property is set to its default value or not.

In reality, if the angles property of the entity is still at its default value, rotating the entity will cause TB to instead create a new angle property and only allow rotation on the z-axis. Only after manually editing the angles value, rotating will work correctly.

image

Steps to Reproduce

Make an entity like described above with an angles parameter, turn it in any direction while keeping angles at default. TB will still create an angle parameter.
Here's a .zip file with a minimal game config. (Set the game's location to game_location/)

anglestest.zip

@kduske kduske added Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems labels Jun 24, 2021
@ericwa
Copy link
Collaborator

ericwa commented Jun 24, 2021

This is more of a UX bug - it's working as intended, so it's not really a code bug per se, but the current behaviour is obscure/inconvenient for cases when you want to pitch or roll something, since you need to manually add the "angles" key for it to work.

We'll need some research on what other editors do + user feedback for this.

@kduske
Copy link
Collaborator

kduske commented Jun 24, 2021

Yeah, it's not quite clear to me what the right thing to do would be here.

@tanukibouwer
Copy link
Contributor Author

My personal preference would be for TB to, if the angles key is defined for the object, use the key when rotating, since otherwise I'll have to manually click the key each time I want to rotate a new object, which can get pretty tedious.

@RobertBeckebans
Copy link

It's indeed annoying if you have to add "angles" "0 0 0" manually each time. It would be nice to have a different behaviour through a gameconfig entry.

For my Doom 3 branch I changed it like this:
RobertBeckebans@7f39de6

@codecat
Copy link

codecat commented Mar 5, 2022

I agree with the proposed solutions, I was confused about this myself too.

Perhaps additionally it's possible to mark a property in the fgd format as "always add this value with the default"? Or something in the settings to toggle the preferred rotation policy.

@kduske
Copy link
Collaborator

kduske commented Apr 6, 2022

Having implemented this now, I wonder if this is really what everybody wants. Now, every light that is rotated gets a mangle key, turning it into a spotlight. I wonder if it wouldn't be better to keep it as is for light entities.

@kduske kduske added this to the 2022.2 milestone May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants