Question about detaching

I actually ended up using DetachFromComponent on the HitComponent directly and it seems to have functioned identically to calling DetachFromActor on the HitComponent’s Actor. Is there a difference functionally here that I am not aware of? From inspecting the statue during the run, I have indeed observed that it no longer is a nested component of the statue stand after it is picked up using DetachFromComponent as mentioned.

DetachFromActor just calls DetachFromComponent on the root component. This is the full definition:

void AActor::DetachFromActor(const FDetachmentTransformRules& DetachmentRules)
{
	if (RootComponent)
	{
		RootComponent->DetachFromComponent(DetachmentRules);
	}
}

Hey @DanM thanks. Why was it chosen to call DetachFromActor in the video if this is the case? It sounds like it would be extra steps unless there is some sort of “good practice” reason or similar.

Not quite sure to be honest, detach from component probably makes more sense.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms