RealDocs

AActor::GetSimpleCollisionCylinder

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtual

Description

Returns an axis-aligned cylinder approximating this actor's simple collision, used for broad checks like AI pathfinding proximity tests. Falls back to GetComponentsBoundingCylinder if the root component has no registered collision.

Caveats & Gotchas

  • This is not the same as the physics collision shape. It is a coarse approximation used for pawn reach tests and similar AI queries — do not rely on it for precise overlap or hit detection.
  • The returned cylinder is always axis-aligned. For actors with complex or rotated collision (e.g. a tilted vehicle), this may significantly over- or under-estimate the actual extent.

Signature

ENGINE_API virtual void GetSimpleCollisionCylinder(float& CollisionRadius, float& CollisionHalfHeight) const

Parameters

Name Type Description Default
CollisionRadius float& Output: the radius of the bounding cylinder in cm.
CollisionHalfHeight float& Output: the half-height of the bounding cylinder in cm.

Return Type

void

Example

Use bounding cylinder for proximity check C++
float Radius, HalfHeight;
GetSimpleCollisionCylinder(Radius, HalfHeight);
// Use radius for a flat 2D proximity test
float DistXY = FVector::DistXY(GetActorLocation(), TargetLocation);
if (DistXY < Radius + AcceptanceRadius)
{
    // Close enough
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.