Hello,
I’m trying to do a SweepSingleByChannel() that takes in consideration the position and rotation of a mesh, but apparently, there’s no built-in way to do that.
The default UPrimitiveComponent::GetCollisionShape() is:
FCollisionShape UPrimitiveComponent::GetCollisionShape(float Inflation) const
{
// This is intended to be overridden by shape classes, so this is a simple, large bounding shape.
FVector Extent = Bounds.BoxExtent + Inflation;
if (Inflation < 0.f)
{
// Don't shrink below zero size.
Extent = Extent.ComponentMax(FVector::ZeroVector);
}
return FCollisionShape::MakeBox(Extent);
}
Any idea how I could get the collision data that is generated on the editor and use it there?
I’ve tried to look into PhysX, couldn’t progress much (it’s a whole new world and I’m not used to it!), but I found a question without answer that would probably solve my problem.
Any idea how can I do this? Thank you very much in advance!
Update:
I can’t edit the thread title, sadly. It was supposed to be “How to get the actual FCollisionShape data from a mesh/model and do a Sweep with it”