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

Hello,

I’m trying to launch a simple sphere actor with physics. The launcher requires just a general actor. I want to be able to launch anything with it. The problem is, I always need a component to use the “Impulse” node, which a basic Actor can’t give me. Since every Actor has an “Enable Physics” by default in it’s root component, is it possible? Why can’t I just set the velocity for it?

Would I need to restrict the types of Actors in the launcher?

I don’t want to move it, I want to launch it into a chaotic space and who knows what’s gonna happen next.

Thanks,

1 Like

Hello,

Not entirely sure what you are after, but would something like this work:

You can play with the values (Multiplier is set to 1000). This will launch a chair which I’ve set to a Physics Actor up and along the Y axis within the specified float range. If this doesn’t get you want you are after, a more specific example of what you want to achieve might help us come up with another solution.

-W

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

Well, from a general Actor I can’t find the Add Impulse at Location node.

Actors don’t take impulse, primitive components do. See my answer below.

The cast to Primitive Component was the magic I needed. Thanks!