MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / UpdateBounds

Method UpdateBounds

Source/Engine/Physics/Colliders/CharacterController.cpp:361–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void CharacterController::UpdateBounds()
362{
363 _cachedScale = GetScale().GetAbsolute().MaxValue();
364 float height, radius;
365 GetControllerSize(height, radius);
366 const Vector3 position = GetControllerPosition();
367 const Vector3 extent(radius, height * 0.5f + radius, radius);
368 _box = BoundingBox(position - extent, position + extent);
369 BoundingSphere::FromBox(_box, _sphere);
370}
371
372void CharacterController::AddMovement(const Vector3& translation, const Quaternion& rotation)
373{

Callers

nothing calls this directly

Calls 4

GetScaleFunction · 0.85
BoundingBoxClass · 0.50
MaxValueMethod · 0.45
GetAbsoluteMethod · 0.45

Tested by

no test coverage detected