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

Improve visualization of WorldBoundary2D editor #86208

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

MarcusElg
Copy link
Contributor

@MarcusElg MarcusElg commented Dec 15, 2023

Fixes godotengine/godot-proposals#817

Changes the worldboundary 2d shape editor to be more clear. Changes the normal to not be the same colour as the line as it isn't actually part of the collision shape. Also changes the visualisation of the line to be a gradient to visualise that it's an infinite line.

Old
image

New
image

Let me know what you think 😄

@AThousandShips AThousandShips changed the title Improve visualisation of worldboundary2d editor Improve visualisation of WorldBoundary2D editor Dec 15, 2023
@AThousandShips AThousandShips requested a review from a team December 15, 2023 17:49
@AThousandShips AThousandShips added this to the 4.x milestone Dec 15, 2023
scene/resources/world_boundary_shape_2d.cpp Outdated Show resolved Hide resolved
scene/resources/world_boundary_shape_2d.cpp Outdated Show resolved Hide resolved
scene/resources/world_boundary_shape_2d.cpp Outdated Show resolved Hide resolved
@Lazy-Rabbit-2001
Copy link
Contributor

I think, from the point of view of a green hand, it's not clear yet which side will be detected and which one not. Also, black is not attention-attractive and may be blended in some situations, especially when a developer is building a scene with darkness.
Maybe a red or orange color could be better than purely dark one. As for signing which side will be detected, perhaps you can separate the color of the short-long line into two parts: one that will be detected is red while the other one not done so will be yellow or other colors that you think have attractive function.

@MewPurPur
Copy link
Contributor

MewPurPur commented Dec 19, 2023

I like the gradient, but we definitely want to keep the handle with the normal debug colors and in my opinion also make it an arrow. WorldBoundaryShape2D

@MarcusElg
Copy link
Contributor Author

MarcusElg commented Dec 20, 2023

I like the gradient, but we definitely want to keep the handle with the normal debug colors and in my opinion also make it an arrow. WorldBoundaryShape2D

Which are the normal debug colours? Turning it into an arrow makes sense.

@MewPurPur
Copy link
Contributor

You know, the blue translucent.

@MarcusElg
Copy link
Contributor Author

MarcusElg commented Dec 20, 2023

You know, the blue translucent.

image
Is this better? Still feel like it would be nice to have some sort of difference between the arrow and the actual collision shape. Looking at the other collisionshapes it's only the ray seperation shape that has extra visual details, all other shapes only show the actual collision shape.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 20, 2023

Maybe it can use the same color as one-way arrow?
image

@MarcusElg
Copy link
Contributor Author

Maybe it can use the same color as one-way arrow? image

What node is that?

@KoBeWi
Copy link
Member

KoBeWi commented Dec 20, 2023

CollisionShape2D with one_way_collision enabled.

@MarcusElg
Copy link
Contributor Author

Maybe it can use the same color as one-way arrow? image

image
It does make sense as the worldboundaryshape always is one sided

@KoBeWi
Copy link
Member

KoBeWi commented Dec 21, 2023

Ok so the remaining issue would be that you can enable one-way on boundary shape, ending with two ambiguous arrows 🤔
image
I'm not sure how to solve this one, other than maybe making the boundary arrow ever more prominent or using a different arrow shape.

@MarcusElg
Copy link
Contributor Author

How would I move forward with this?

@KoBeWi
Copy link
Member

KoBeWi commented Jan 1, 2024

You can join the developer chat to ask for feedback and discuss.

@MarcusElg
Copy link
Contributor Author

@KoBeWi what do you think of this?

image

I feel like it works quite well

@MewPurPur
Copy link
Contributor

I like this.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 21, 2024

The arrow is wobbly rotated on high zoom:

godot.windows.editor.dev.x86_64_BgcKzJe4lx.mp4

Though I guess that's how polyline works.

And on lower zoom (even on default) the arrow shape is not very clear:
image
Maybe it should be a bit bigger to appear properly at least on 100% zoom. The screenshot you showed seems to be on 300% zoom.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arrow could be bigger, but otherwise looks fine IMO.

@MarcusElg
Copy link
Contributor Author

The arrow could be bigger, but otherwise looks fine IMO.

Increased the size, this is at 100% zoom:
image

@MewPurPur
Copy link
Contributor

Wobblyness is likely you being project with some sort of pixel snap? Pixel snap also affects debug drawing in the editor.

@akien-mga akien-mga requested a review from Calinou February 22, 2024 09:56
@MarcusElg
Copy link
Contributor Author

@Calinou what do you think of the current version of this pr? Would be nice to get it merged soon.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 4, 2024
@akien-mga akien-mga merged commit f289ec9 into godotengine:master Mar 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@MarcusElg MarcusElg deleted the betterworldboundary branch March 4, 2024 15:17
@akien-mga akien-mga changed the title Improve visualisation of WorldBoundary2D editor Improve visualization of WorldBoundary2D editor Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve editor gizmos for WorldBoundaryShape2D
6 participants