Class PhysicsShapeAuthoring
Inheritance
PhysicsShapeAuthoring
Syntax
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
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
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
Declaration
public bool OverrideCustomTags { get; set; }
Property Value
OverrideFriction
Declaration
public bool OverrideFriction { get; set; }
Property Value
OverrideIsTrigger
Declaration
public bool OverrideIsTrigger { get; set; }
Property Value
OverrideRaisesCollisionEvents
Declaration
public bool OverrideRaisesCollisionEvents { get; set; }
Property Value
OverrideRestitution
Declaration
public bool OverrideRestitution { get; set; }
Property Value
RaisesCollisionEvents
Declaration
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
GetCapsuleProperties(out quaternion)
Declaration
[Obsolete("This signature has been deprecated. Use the signature returning CapsuleGeometryAuthoring instead. (RemovedAfter 2020-05-07)")]
public CapsuleGeometry GetCapsuleProperties(out quaternion orientation)
Parameters
Type |
Name |
Description |
quaternion |
orientation |
|
Returns
GetConvexHullProperties(NativeList<float3>)
Declaration
public void GetConvexHullProperties(NativeList<float3> pointCloud)
Parameters
Type |
Name |
Description |
NativeList<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<float3> |
vertices |
|
NativeList<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 |
float3 |
center |
|
float2 |
size |
|
quaternion |
orientation |
|
GetSphereProperties(out quaternion)
Declaration
public SphereGeometry GetSphereProperties(out quaternion orientation)
Parameters
Type |
Name |
Description |
quaternion |
orientation |
|
Returns
SetBox(BoxGeometry)
Declaration
public void SetBox(BoxGeometry geometry)
Parameters
SetCapsule(CapsuleGeometryAuthoring)
Declaration
public void SetCapsule(CapsuleGeometryAuthoring geometry)
Parameters
SetCapsule(CapsuleGeometry, quaternion)
Declaration
[Obsolete("This signature has been deprecated. Use the signature taking CapsuleGeometryAuthoring instead. (RemovedAfter 2020-05-07)")]
public void SetCapsule(CapsuleGeometry geometry, quaternion orientation)
Parameters
SetConvexHull(ConvexHullGenerationParameters, Single)
Declaration
public void SetConvexHull(ConvexHullGenerationParameters hullGenerationParameters, float minimumSkinnedVertexWeight)
Parameters
SetConvexHull(ConvexHullGenerationParameters, UnityEngine.Mesh)
Declaration
public void SetConvexHull(ConvexHullGenerationParameters hullGenerationParameters, UnityEngine.Mesh customMesh = null)
Parameters
SetCylinder(CylinderGeometry)
Declaration
public void SetCylinder(CylinderGeometry geometry)
Parameters
SetMesh(UnityEngine.Mesh)
Declaration
public void SetMesh(UnityEngine.Mesh mesh = null)
Parameters
Type |
Name |
Description |
UnityEngine.Mesh |
mesh |
|
SetPlane(float3, float2, quaternion)
Declaration
public void SetPlane(float3 center, float2 size, quaternion orientation)
Parameters
Type |
Name |
Description |
float3 |
center |
|
float2 |
size |
|
quaternion |
orientation |
|
SetSphere(SphereGeometry, quaternion)
Declaration
public void SetSphere(SphereGeometry geometry, quaternion orientation)
Parameters
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.