How can I launch a simple Actor with Velocity and Friction?

Wes’ graph is somewhat helpful but it’s not answering the questions since the actor has been predefined - but what is being asked is how to handle this generically.

The target for AddImpulse must be a primitive component (and the primitive component must have physics enabled in order to work). In order to do this, I would make one assumption and stick to it when making my content - and that is that every actor that can be launched, will have a primitive component with physics as the root component.

From there, you can take a reference to the actor in question, get the root component and cast it to a primitive component. If it is a primitive component, add impulse to it, and if not, then it isn’t launchable, and you can ignore it or do whatever you want to do when an object is not launchable.

Hope it helps :slight_smile:

1 Like