How would I make a wind ability?

I’m trying to create an ability where the player will pick up an item that will allow the player to blow or shoot a gust of wind to knock over some cubes within my game opening a pathway. I’ve made the cubes and have the item but i don’t know how to actually create the ability. Can anyone help?

Do a trace from your object to your cubes to get an array of cubes.

Iterate through the array of cubes and apply some force to them in a direction based on the location of your item vs the location of you cube.

You could make a wind blueprint that spawns out of your character–have it spawn invisible boxes/spheres that apply force to objects and aren’t effected by gravity. Then, there are some free particle effects in some of the tutorial levels you can mess around with and add on to the invisible objects to give them a wind/steam like look.

Do you have an example of this because I tried to create a trace and it seems to only point towards world 0, 0, 0 so I can’t get it to hit the cubes.

Hehe. I tend to forget how complicated this stuff seems the first time you see it. Here you go.

You want to be familiar with all those nodes, what they mean, and why they are being used. Hovering over them with your mouse until the tooltip shows up is a good way to start learning about the ones you haven’t seen before.

Note that the cube actor needs to have physics enabled on its static mesh component.

Thank you for this, I’ve managed to create a similar sort of thing using this and it works but now i need to make it so that when I pick up my mask it turns physics on for the cube bevause i dont want to be able to knock over the cubes before the player has the mask. I’ve been trying to create a bool that triggers on pickup and casts to the cube simulating physics but that doesn’t seem to be working so far.

In the place that you pick up your mask, you can do a Get All Actors Of Class and loop through the results and set them.