Skip to content

Commit 6b59a1a

Browse files
author
Unity Technologies
committed
com.unity.physics@1.3.15
## [1.3.15] - 2026-01-08 ### Changed * RigidBodyAspect and ColliderAspect marked as obsolete along with IAspect. In order to consolidate our API and improve iteration time, we have decided to remove Aspects in a future major release of Entities. Component and EntityQuery APIs should be used directly in the future instead of Aspects. Both Entities.ForEach and Aspects will remain supported in 1.x packages of Entities.
1 parent 3d8d233 commit 6b59a1a

File tree

70 files changed

+4364
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4364
-7
lines changed

.attestation.p7m

10.6 KB
Binary file not shown.

.signature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"timestamp":1768411577,"signature":"GiuBreQY918F/N1U5AikSblhBaPxqg/qB3+cuI/CC1ymOZQoH3lp//AWS74oCgK5dxav/skcV/3ySoC9r5yn6JDpOeX+PLzUCSY1OcFspdkI7bcM/OiinUYGucRqd2vxCxVbfvQrD40I9LFJLRCcZzU03NSfAsKFGS7oJqJnQuwQLX898fIJs8PVB3Swmml89OjYUBH442SyGqxtepG6zz8p8fxt8ItmibVXfbxuYpSYbMIPr4Wy11m6n5cSZihaFe62Q20UyDWKwgqVYNd+ZugFfIKmA1ND5G5kVgSUiDXmcJ4uun0aiYa1tlzqNBuuyBXe94Z23foj/5p85DHWgm1uwRkH22y9B2gV9rFjsbkt/vbNSMu3JwR4Ntl0vq7AYiS9EQncMBu08wrzYKeHCawlj/oVkyaWW0nWCluTGDxDxoiAtzrwrFatvUvX/yjehAJxZaPuTT8L2DdvNT6U7xpCRhHv0+dg+oPaDD5niA0dvMR29aUna6yWqsRCpkxN","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4ZEJjTlJKSAordHR4SmoxcVY1NTdvMlZaRE1XaXhYRVBkRTBEMVFkT1JIRXNSS1RscmplUXlERU83ZlNQS0ZwZ1A3MU5TTnJCCkFHM2NFSU45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
uid: unity-physics-changelog
33
---
44

5+
# Changelog
6+
7+
## [1.3.15] - 2026-01-08
8+
9+
### Changed
10+
* RigidBodyAspect and ColliderAspect marked as obsolete along with IAspect. In order to consolidate our API and improve iteration time, we have decided to remove Aspects in a future major release of Entities. Component and EntityQuery APIs should be used directly in the future instead of Aspects. Both Entities.ForEach and Aspects will remain supported in 1.x packages of Entities.
11+
512

613
## [1.3.14] - 2025-04-11
714

@@ -10,7 +17,7 @@ uid: unity-physics-changelog
1017
* Updated the `com.unity.entities` dependency to version `1.3.14`
1118
* Updated the `com.unity.burst` dependency to version `1.8.19`
1219
* Updated the `com.unity.test-framework dependency` to version `1.4.6`
13-
* The minimum supported editor version is now 2022.3.20f1
20+
* The minimum supported editor version is now 2022.3.13f1
1421

1522
### Fixed
1623

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
using System;
2+
using Unity.Mathematics;
3+
using UnityEditor;
4+
using UnityEditor.IMGUI.Controls;
5+
using UnityEngine;
6+
7+
namespace Unity.Physics.Editor
8+
{
9+
class BeveledBoxBoundsHandle : BoxBoundsHandle
10+
{
11+
public float bevelRadius
12+
{
13+
get => math.min(m_BevelRadius, math.cmin(GetSize()) * 0.5f);
14+
set
15+
{
16+
if (!m_IsDragging)
17+
m_BevelRadius = math.max(0f, value);
18+
}
19+
}
20+
float m_BevelRadius = ConvexHullGenerationParameters.Default.BevelRadius;
21+
bool m_IsDragging = false;
22+
23+
static PhysicsBoundsHandleUtility.Corner[] s_Corners = new PhysicsBoundsHandleUtility.Corner[8];
24+
25+
public new void DrawHandle()
26+
{
27+
int prevHotControl = GUIUtility.hotControl;
28+
if (prevHotControl == 0)
29+
m_IsDragging = false;
30+
base.DrawHandle();
31+
int currHotcontrol = GUIUtility.hotControl;
32+
if (currHotcontrol != prevHotControl)
33+
m_IsDragging = currHotcontrol != 0;
34+
}
35+
36+
protected override void DrawWireframe()
37+
{
38+
if (this.bevelRadius <= 0f)
39+
{
40+
base.DrawWireframe();
41+
return;
42+
}
43+
44+
var cameraPosition = float3.zero;
45+
var cameraForward = new float3 { z = 1f };
46+
if (Camera.current != null)
47+
{
48+
cameraPosition = Camera.current.transform.position;
49+
cameraForward = Camera.current.transform.forward;
50+
}
51+
52+
var bounds = new Bounds(this.center, this.size);
53+
bool isCameraInsideBox = Camera.current != null && bounds.Contains(Handles.inverseMatrix.MultiplyPoint(cameraPosition));
54+
var bevelRadius = this.bevelRadius;
55+
var origin = (float3)this.center;
56+
var size = (float3)this.size;
57+
58+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(1f, 1f, 1f), bevelRadius, 0, axes, isCameraInsideBox);
59+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(-1f, 1f, 1f), bevelRadius, 0, axes, isCameraInsideBox);
60+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(1f, 1f, 1f), bevelRadius, 1, axes, isCameraInsideBox);
61+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(1f, -1f, 1f), bevelRadius, 1, axes, isCameraInsideBox);
62+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(1f, 1f, 1f), bevelRadius, 2, axes, isCameraInsideBox);
63+
PhysicsBoundsHandleUtility.DrawFace(origin, size * new float3(1f, 1f, -1f), bevelRadius, 2, axes, isCameraInsideBox);
64+
65+
var corner = 0.5f * size - new float3(1f) * bevelRadius;
66+
var axisx = new float3(1f, 0f, 0f);
67+
var axisy = new float3(0f, 1f, 0f);
68+
var axisz = new float3(0f, 0f, 1f);
69+
70+
// Since the geometry is transformed by Handles.matrix during rendering, we transform the camera position
71+
// by the inverse matrix so that the two-shaded wireframe will have the proper orientation.
72+
var invMatrix = Handles.inverseMatrix;
73+
cameraPosition = invMatrix.MultiplyPoint(cameraPosition);
74+
cameraForward = invMatrix.MultiplyVector(cameraForward);
75+
var cameraOrtho = Camera.current == null || Camera.current.orthographic;
76+
77+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(-1f, 1f, -1f), quaternion.LookRotation(-axisz, axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[0]);
78+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(-1f, 1f, 1f), quaternion.LookRotation(-axisx, axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[1]);
79+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(1f, 1f, 1f), quaternion.LookRotation(axisz, axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[2]);
80+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(1f, 1f, -1f), quaternion.LookRotation(axisx, axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[3]);
81+
82+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(-1f, -1f, -1f), quaternion.LookRotation(-axisx, -axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[4]);
83+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(-1f, -1f, 1f), quaternion.LookRotation(axisz, -axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[5]);
84+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(1f, -1f, 1f), quaternion.LookRotation(axisx, -axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[6]);
85+
PhysicsBoundsHandleUtility.CalculateCornerHorizon(origin + corner * new float3(1f, -1f, -1f), quaternion.LookRotation(-axisz, -axisy), cameraPosition, cameraForward, cameraOrtho, bevelRadius, out s_Corners[7]);
86+
87+
for (int i = 0; i < s_Corners.Length; i++)
88+
PhysicsBoundsHandleUtility.DrawCorner(s_Corners[i], true);
89+
90+
// Draw the horizon edges between the corners
91+
for (int upA = 3, upB = 0; upB < 4; upA = upB, upB++)
92+
{
93+
int dnA = upA + 4;
94+
int dnB = upB + 4;
95+
96+
if (s_Corners[upA].splitAxis[0].z && s_Corners[upB].splitAxis[1].x) Handles.DrawLine(s_Corners[upA].points[0], s_Corners[upB].points[1]);
97+
if (s_Corners[upA].splitAxis[1].z && s_Corners[upB].splitAxis[0].x) Handles.DrawLine(s_Corners[upA].points[1], s_Corners[upB].points[0]);
98+
99+
if (s_Corners[dnA].splitAxis[0].x && s_Corners[dnB].splitAxis[1].z) Handles.DrawLine(s_Corners[dnA].points[0], s_Corners[dnB].points[1]);
100+
if (s_Corners[dnA].splitAxis[1].x && s_Corners[dnB].splitAxis[0].z) Handles.DrawLine(s_Corners[dnA].points[1], s_Corners[dnB].points[0]);
101+
102+
if (s_Corners[dnA].splitAxis[0].y && s_Corners[upA].splitAxis[1].y) Handles.DrawLine(s_Corners[dnA].points[0], s_Corners[upA].points[1]);
103+
if (s_Corners[dnA].splitAxis[1].y && s_Corners[upA].splitAxis[0].y) Handles.DrawLine(s_Corners[dnA].points[1], s_Corners[upA].points[0]);
104+
}
105+
}
106+
}
107+
}

Samples~/CustomPhysicsAuthoring/Unity.Physics.Custom.Editor/EditorTools/BeveledBoxBoundsHandle.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)