Class PhysicsShapeAuthoring
Inheritance
PhysicsShapeAuthoring
Syntax
[AddComponentMenu("DOTS/Physics/Physics Shape")]
public sealed class PhysicsShapeAuthoring : MonoBehaviour, IInheritPhysicsMaterialProperties, IPhysicsMaterialProperties, ISerializationCallbackReceiver
Properties
BelongsTo
Declaration
public PhysicsCategoryTags BelongsTo { get; set; }
Property Value
CollidesWith
Declaration
public PhysicsCategoryTags CollidesWith { get; set; }
Property Value
CollisionResponse
Declaration
public CollisionResponsePolicy CollisionResponse { get; set; }
Property Value
ConvexHullGenerationParameters
Declaration
public ConvexHullGenerationParameters ConvexHullGenerationParameters { get; }
Property Value
Declaration
public CustomPhysicsMaterialTags CustomTags { get; set; }
Property Value
ForceUnique
Declaration
public bool ForceUnique { get; set; }
Property Value
Friction
Declaration
public PhysicsMaterialCoefficient Friction { get; set; }
Property Value
IsTrigger
Declaration
[Obsolete("IsTrigger has been deprecated. Use CollisionResponse instead. (RemovedAfter 2020-08-20)")]
public bool IsTrigger { get; set; }
Property Value
MaterialTemplate
Declaration
public PhysicsMaterialTemplate MaterialTemplate { get; set; }
Property Value
OverrideBelongsTo
Declaration
public bool OverrideBelongsTo { get; set; }
Property Value
OverrideCollidesWith
Declaration
public bool OverrideCollidesWith { get; set; }
Property Value
OverrideCollisionResponse
Declaration
public bool OverrideCollisionResponse { get; set; }
Property Value
Declaration
public bool OverrideCustomTags { get; set; }
Property Value
OverrideFriction
Declaration
public bool OverrideFriction { get; set; }
Property Value
OverrideIsTrigger
Declaration
[Obsolete("OverrideIsTrigger has been deprecated. Use OverrideCollisionResponse instead. (RemovedAfter 2020-08-20)", true)]
public bool OverrideIsTrigger { get; set; }
Property Value
OverrideRaisesCollisionEvents
Declaration
[Obsolete("OverrideRaisesCollisionEvents has been deprecated. Use OverrideCollisionResponse instead. (RemovedAfter 2020-08-20)", true)]
public bool OverrideRaisesCollisionEvents { get; set; }
Property Value
OverrideRestitution
Declaration
public bool OverrideRestitution { get; set; }
Property Value
RaisesCollisionEvents
Declaration
[Obsolete("RaisesCollisionEvents has been deprecated. Use CollisionResponse instead. (RemovedAfter 2020-08-20)")]
public bool RaisesCollisionEvents { get; set; }
Property Value
Restitution
Declaration
public PhysicsMaterialCoefficient Restitution { get; set; }
Property Value
ShapeType
Declaration
public ShapeType ShapeType { get; }
Property Value
Methods
FitToEnabledRenderMeshes(Single)
Fit this shape to render geometry in its GameObject hierarchy.
Children in the hierarchy will influence the result if they have enabled MeshRenderer components or have vertices bound to them on a SkinnedMeshRenderer.
Children will only count as influences if this shape is the first ancestor shape in their hierarchy.
As such, you should add shape components to all GameObjects that should have them before you call this method on any of them.
Declaration
public void FitToEnabledRenderMeshes(float minimumSkinnedVertexWeight = 0F)
Parameters
Type |
Name |
Description |
Single |
minimumSkinnedVertexWeight |
The minimum total weight that a vertex in a skinned mesh must have assigned to this object and/or any of its influencing children.
|
GetBoxProperties()
Declaration
public BoxGeometry GetBoxProperties()
Returns
GetCapsuleProperties()
Declaration
public CapsuleGeometryAuthoring GetCapsuleProperties()
Returns
GetConvexHullProperties(NativeList<float3>)
Declaration
public void GetConvexHullProperties(NativeList<float3> pointCloud)
Parameters
Type |
Name |
Description |
NativeList<Unity.Mathematics.float3> |
pointCloud |
|
GetCylinderProperties()
Declaration
public CylinderGeometry GetCylinderProperties()
Returns
GetMeshProperties(NativeList<float3>, NativeList<int3>)
Declaration
public void GetMeshProperties(NativeList<float3> vertices, NativeList<int3> triangles)
Parameters
Type |
Name |
Description |
NativeList<Unity.Mathematics.float3> |
vertices |
|
NativeList<Unity.Mathematics.int3> |
triangles |
|
GetPlaneProperties(out float3, out float2, out quaternion)
Declaration
public void GetPlaneProperties(out float3 center, out float2 size, out quaternion orientation)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
center |
|
Unity.Mathematics.float2 |
size |
|
Unity.Mathematics.quaternion |
orientation |
|
GetSphereProperties(out quaternion)
Declaration
public SphereGeometry GetSphereProperties(out quaternion orientation)
Parameters
Type |
Name |
Description |
Unity.Mathematics.quaternion |
orientation |
|
Returns
SetBox(BoxGeometry)
Declaration
public void SetBox(BoxGeometry geometry)
Parameters
SetCapsule(CapsuleGeometryAuthoring)
Declaration
public void SetCapsule(CapsuleGeometryAuthoring geometry)
Parameters
SetConvexHull(ConvexHullGenerationParameters, Single)
Declaration
public void SetConvexHull(ConvexHullGenerationParameters hullGenerationParameters, float minimumSkinnedVertexWeight)
Parameters
SetConvexHull(ConvexHullGenerationParameters, Mesh)
Declaration
public void SetConvexHull(ConvexHullGenerationParameters hullGenerationParameters, Mesh customMesh = null)
Parameters
SetCylinder(CylinderGeometry)
Declaration
public void SetCylinder(CylinderGeometry geometry)
Parameters
SetMesh(Mesh)
Declaration
public void SetMesh(Mesh mesh = null)
Parameters
Type |
Name |
Description |
Mesh |
mesh |
|
SetPlane(float3, float2, quaternion)
Declaration
public void SetPlane(float3 center, float2 size, quaternion orientation)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
center |
|
Unity.Mathematics.float2 |
size |
|
Unity.Mathematics.quaternion |
orientation |
|
SetSphere(SphereGeometry, quaternion)
Declaration
public void SetSphere(SphereGeometry geometry, quaternion orientation)
Parameters
Type |
Name |
Description |
SphereGeometry |
geometry |
|
Unity.Mathematics.quaternion |
orientation |
|
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
Implements
ISerializationCallbackReceiver.OnBeforeSerialize()
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()
Implements