Why not initialise UPhysicsHandleComponent in BeginPlay()?

Hi!

I’m just wondering why we don’t create a private variable to hold the UPhysicsHandleComponent, and then initialise it (with nullptr check) in BeginPlay()? Instad of creating a getter function that gets it from the owner and does the check every time.
I don’t see why the UPhysicsHandleComponent would change as gameplay goes on, but maybe we’ll get to that later…

Kind regards.
Håkan

That’s basically how I would do it honestly. I would just create the physics handle component as a subobject.

1 Like

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

Privacy & Terms