Class CapsuleComponent
A capsule generally used for simple collision. Bounds are rendered as lines in the editor.
Inheritance
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class CapsuleComponent : ShapeComponent
Properties
| Improve this Doc View SourceCapsuleHalfHeight
Half-height, from center of capsule to the end of top or bottom hemisphere.
Declaration
public float CapsuleHalfHeight { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
This cannot be less than CapsuleRadius.
CapsuleRadius
Radius of cap hemispheres and center cylinder.
Declaration
public float CapsuleRadius { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
This cannot be more than CapsuleHalfHeight.
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static CapsuleComponent DefaultObject { get; }
Property Value
Type | Description |
---|---|
CapsuleComponent |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Methods
| Improve this Doc View SourceGetScaledCapsuleHalfHeight()
Returns the capsule half-height scaled by the component scale.
Declaration
public float GetScaledCapsuleHalfHeight()
Returns
Type | Description |
---|---|
System.Single |
Remarks
This includes both the cylinder and hemisphere cap. @return The capsule half-height scaled by the component scale.
GetScaledCapsuleHalfHeight_WithoutHemisphere()
Returns the capsule half-height minus radius (to exclude the hemisphere), scaled by the component scale.
Declaration
public float GetScaledCapsuleHalfHeight_WithoutHemisphere()
Returns
Type | Description |
---|---|
System.Single |
Remarks
From the center of the capsule this is the vertical distance along the straight cylindrical portion to the point just before the curve of top hemisphere begins. @return The capsule half-height minus radius, scaled by the component scale.
GetScaledCapsuleRadius()
Returns the capsule radius scaled by the component scale.
Declaration
public float GetScaledCapsuleRadius()
Returns
Type | Description |
---|---|
System.Single |
Remarks
@return The capsule radius scaled by the component scale.
GetScaledCapsuleSize()
Returns the capsule radius and half-height scaled by the component scale.
Declaration
public (float, float) GetScaledCapsuleSize()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Single> |
Remarks
Half-height includes the hemisphere end cap. @param OutRadius Radius of the capsule, scaled by the component scale. @param OutHalfHeight Half-height of the capsule, scaled by the component scale. Includes the hemisphere end cap. @return The capsule radius and half-height scaled by the component scale.
GetScaledCapsuleSize_WithoutHemisphere()
Returns the capsule radius and half-height scaled by the component scale.
Declaration
public (float, float) GetScaledCapsuleSize_WithoutHemisphere()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Single> |
Remarks
Half-height excludes the hemisphere end cap. @param OutRadius Radius of the capsule, ignoring component scaling. @param OutHalfHeightWithoutHemisphere Half-height of the capsule, scaled by the component scale. Excludes the hemisphere end cap. @return The capsule radius and half-height scaled by the component scale.
GetShapeScale()
Get the scale used by this shape.
Declaration
public float GetShapeScale()
Returns
Type | Description |
---|---|
System.Single |
Remarks
This is a uniform scale that is the minimum of any non-uniform scaling. @return the scale used by this shape.
GetUnscaledCapsuleHalfHeight()
Returns the capsule half-height, ignoring component scaling.
Declaration
public float GetUnscaledCapsuleHalfHeight()
Returns
Type | Description |
---|---|
System.Single |
Remarks
This includes the hemisphere end cap. @return The capsule radius, ignoring component scaling.
GetUnscaledCapsuleHalfHeight_WithoutHemisphere()
Returns the capsule half-height minus radius (to exclude the hemisphere), ignoring component scaling.
Declaration
public float GetUnscaledCapsuleHalfHeight_WithoutHemisphere()
Returns
Type | Description |
---|---|
System.Single |
Remarks
This excludes the hemisphere end cap. From the center of the capsule this is the vertical distance along the straight cylindrical portion to the point just before the curve of top hemisphere begins. @return The capsule half-height minus radius, ignoring component scaling.
GetUnscaledCapsuleRadius()
Returns the capsule radius, ignoring component scaling.
Declaration
public float GetUnscaledCapsuleRadius()
Returns
Type | Description |
---|---|
System.Single |
Remarks
@return the capsule radius, ignoring component scaling.
GetUnscaledCapsuleSize()
Returns the capsule radius and half-height scaled by the component scale.
Declaration
public (float, float) GetUnscaledCapsuleSize()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Single> |
Remarks
Half-height includes the hemisphere end cap. @param OutRadius Radius of the capsule, scaled by the component scale. @param OutHalfHeight Half-height of the capsule, scaled by the component scale. Includes the hemisphere end cap. @return The capsule radius and half-height scaled by the component scale.
GetUnscaledCapsuleSize_WithoutHemisphere()
Returns the capsule radius and half-height, ignoring component scaling.
Declaration
public (float, float) GetUnscaledCapsuleSize_WithoutHemisphere()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Single> |
Remarks
Half-height excludes the hemisphere end cap. @param OutRadius Radius of the capsule, ignoring component scaling. @param OutHalfHeightWithoutHemisphere Half-height of the capsule, scaled by the component scale. Excludes the hemisphere end cap. @return The capsule radius and half-height (excluding hemisphere end cap), ignoring component scaling.
New(UObject, Name)
Spawn an object of this class
Declaration
public static CapsuleComponent New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
CapsuleComponent |
SetCapsuleHalfHeight(Single, Boolean)
Set the capsule half-height.
Declaration
public void SetCapsuleHalfHeight(float HalfHeight, bool bUpdateOverlaps)
Parameters
Type | Name | Description |
---|---|---|
System.Single | HalfHeight | |
System.Boolean | bUpdateOverlaps |
Remarks
This is the unscaled half-height, before component scale is applied. If this capsule collides, updates touching array for owner actor. @param HalfHeight : half-height, from capsule center to end of top or bottom hemisphere. @param bUpdateOverlaps: if true and this shape is registered and collides, updates touching array for owner actor.
SetCapsuleRadius(Single, Boolean)
Set the capsule radius.
Declaration
public void SetCapsuleRadius(float Radius, bool bUpdateOverlaps)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Radius | |
System.Boolean | bUpdateOverlaps |
Remarks
This is the unscaled radius, before component scale is applied. If this capsule collides, updates touching array for owner actor. @param Radius : radius of end-cap hemispheres and center cylinder. @param bUpdateOverlaps: if true and this shape is registered and collides, updates touching array for owner actor.
SetCapsuleSize(Single, Single, Boolean)
Change the capsule size.
Declaration
public void SetCapsuleSize(float InRadius, float InHalfHeight, bool bUpdateOverlaps)
Parameters
Type | Name | Description |
---|---|---|
System.Single | InRadius | |
System.Single | InHalfHeight | |
System.Boolean | bUpdateOverlaps |
Remarks
This is the unscaled size, before component scale is applied. @param InRadius : radius of end-cap hemispheres and center cylinder. @param InHalfHeight : half-height, from capsule center to end of top or bottom hemisphere. @param bUpdateOverlaps: if true and this shape is registered and collides, updates touching array for owner actor.
Operators
| Improve this Doc View SourceImplicit(IntPtr to CapsuleComponent)
Convert from IntPtr to UObject
Declaration
public static implicit operator CapsuleComponent(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
CapsuleComponent |