Changing components properties on the fly?

Hi there. Is there any way to change the mobility properties of the character while playing via Blueprints? I’m trying to launch the player forward everytime he shoots. Therefore I’m using this node setup.

The problem is that it only works properly when aiming higher than the horizont line. If I don’t do so, the player gets slowed down because of the friction. When turning off the friction, it works, but it makes the player slide when he walks normally. I need it to be turned off only when he shoots. Is there any way to change this setting with an event?

Advanced thanks!

Wanting to do pretty much the same thing as the original poster, any thoughts on how I can adjust friction just for the duration of the thrust I’m applying to the character?

I’ve gotten around it in the short term by adding a small time delayed jump before firing the launch character.

One thing you could try is just adding a MAX function to the z-axis of your forward vector. I think this would give you more control. For example, using a MAX value of 0.1 guarantees that at a minimum you would get a hop of about 10 meters even if you are looking directly down. As another example, a MAX value of 0.5 (for example) would guarantee that the player always hops at a 45-degree angle – so you can adjust however you want or give different player types different jump angles :slight_smile:

Here’s how I would do it (see attached screenshot).

If you really want to set the ground friction, though, you can do that by getting a reference to the CharacterMovementController. First, get a reference to Self, then drag off and get a “Get Character Movement” node, this will automatically use “Self” as Target. Then drag off the Character Movement pin and search for “Set Ground Friction” which will show up under Character Movement. You can then set this to any value you want.

If this answer solved your question, please check the green arrow to the left. Up Votes are always nice too :slight_smile: