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

Decal node's default orientation doesn't work well with Align Transform/Rotation with View #49647

Closed
Tracked by #57284
Calinou opened this issue Jun 16, 2021 · 0 comments · Fixed by #61493
Closed
Tracked by #57284

Comments

@Calinou
Copy link
Member

Calinou commented Jun 16, 2021

Godot version

4.0.dev (6d98f84)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 465.31)

Issue description

Decals do not line up with the camera when using the Perspective menu's Align Transform with View or Align Rotation with View options while a Decal node is selected. This is because the default Decal orientation doesn't match the camera's.

In contrast, using this shortcut works as expected when aligning a Camera3D node.

This is something we should fix before 4.0 is released, as fixing it after 4.0 is released would break existing projects.

Edit: reduz said that the current default orientation should be kept, since pointing straight down by default makes it more usable. Instead, we should hack around the Align Transform/Rotation with View tools to adjust the rotation with a constant offset if the selected node is a Decal.

Steps to reproduce

  • Add a MeshInstance node with a BoxMesh resource to display the decal on.
  • Add a Decal node and load a texture in its Albedo property.
  • Set the Decal's Normal Fade property to 0.3 to ensure the decal isn't drawn on surfaces that aren't facing the decal.
  • Select the Decal node, move the camera to be close to the box (while looking towards the box) and use the Perspective menu's Align Transform with View or Align Rotation with View.
  • Notice how the surface won't always be painted as expected (rotation is off by 90 degrees on an axis). You can look at the Decal's gizmo. When the Decal node is rotated correctly, the gizmo's line should point away from the surface the decal is being painted on.

Minimal reproduction project

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant