Skip to content

Fixed Volume Gizmo size when rescaling parent GameObject #4915

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

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Skip wind calculations for Speed Tree 8 when wind vector is zero (case 1343002)
- Fixed memory leak when changing SRP pipeline settings, and having the player in pause mode.
- Fixed alignment in Volume Components
- Fixed Volume Gizmo size when rescaling parent GameObject

### Changed
- Changed Window/Render Pipeline/Render Pipeline Debug to Window/Analysis/Rendering Debugger
Expand Down
2 changes: 1 addition & 1 deletion com.unity.render-pipelines.core/Runtime/Volume/Volume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void OnDrawGizmos()
if (isGlobal || colliders == null)
return;

var scale = transform.localScale;
var scale = transform.lossyScale;
var invScale = new Vector3(1f / scale.x, 1f / scale.y, 1f / scale.z);
Gizmos.matrix = Matrix4x4.TRS(transform.position, transform.rotation, scale);
Gizmos.color = CoreRenderPipelinePreferences.volumeGizmoColor;
Expand Down