Class PhysicsShapeAuthoring
Inheritance
PhysicsShapeAuthoring
Inherited Members
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Syntax
[AddComponentMenu("DOTS/Physics/Physics Shape")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.physics@0.51/api/Unity.Physics.Authoring.PhysicsShapeAuthoring.html")]
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
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
OverrideRestitution
Declaration
public bool OverrideRestitution { 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
GetCylinderProperties()
Declaration
public CylinderGeometry GetCylinderProperties()
Returns
GetMeshProperties(NativeList<float3>, NativeList<int3>)
Declaration
public void GetMeshProperties(NativeList<float3> vertices, NativeList<int3> triangles)
Parameters
GetPlaneProperties(out float3, out float2, out quaternion)
Declaration
public void GetPlaneProperties(out float3 center, out float2 size, out quaternion orientation)
Parameters
GetSphereProperties(out quaternion)
Declaration
public SphereGeometry GetSphereProperties(out quaternion orientation)
Parameters
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
SetSphere(SphereGeometry, quaternion)
Declaration
public void SetSphere(SphereGeometry geometry, quaternion orientation)
Parameters
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
Implements
ISerializationCallbackReceiver.OnBeforeSerialize()
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()
Implements
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.