Build walk-able area with a gun?

Hey guys

I have this idea for a mechanic but in order to execute it I need a weapon that can spawn walk-able area with shooting.
So lets say you need to cross an endless abyss to get to the other side. This theoretical weapon could spawn the walk-able area in front of you as you walk by firing slightly downwards making you able to get across.

Imagine any ice hero you’ve ever seen making a piece of ice to skate on as they go in front of them. That’s basically what I’m going for here minus the skating. Any idea on how I would achieve this? The mesh would obviously have to be able to merge with other meshes as it’s shot out of the gun creating essentially one big mesh when the player stops shooting. Like a beam weapon.

+1. I’d love to know this as well.

Oh noes a competitor D:

Any way, you see it here from 1:50 while he skates across the street and lake using his ice, making it as he goes:

Lol, exactly what I was thinking of :stuck_out_tongue: This could obviously be accomplished fairly easily by using & attaching actors, but that probably wouldn’t look good, and wouldn’t be performance efficient. What I am wondering is, even if there is a good way to merge meshes, how would you go about making the path look good if it were like ice, that seems like a lot of small particles/pieces.

I think something along the lines of Voxels would be the answer.

Here is something I’ve worked on, the sound might be a bit loud.

But it’s not really what I’m looking for:

A cool mechanic that I think would work is when the player shoots, it launches a physics ball, particle, thing, and when you let go of the fire buton it spawns a platform. You could combine it with a radial blend in type of effect.

Look into dynamic meshes. I don’t think it is quite usable just yet in blueprint, but I believe it is how people are getting voxels to work right now and can be done in C++.

Isn’t the performance for those absolutely horrible though?

I am sure it can be, but the concept behind it is what makes minecraft and other voxel games possible.

If you don’t have a full voxel world then how you implement it would be key. For instance, you could have a normal scene, and then just turn a lake into a single mesh, either all at once, or pieces at a time(as in the example video above).

If you use separate dynamic meshes everywhere, then yeah it will probably destroy performance.

I don’t plan to generate a world of voxels. It would be a first person shooter, where building part of the level is a mechanic. So you may be given a level like this:

And in order to move around you have two ways:

1) Use your Grappling Hook
2) Make the ground underneath your feet.

That’s how I’d use it. Then you also have the ability to remove what you spawned as well as removing what others spawned which plays in too. So would performance be that bad?

You don’t have to build a world of voxels, I just used that as an example of what dynamic meshes are used for. I think they use a dynamic mesh for landscape as well.

I tried using a spline actor from the example content, but I couldn’t change the spline actors end point when it was spawned so that didn’t work.

just did a quick test, would need some tweeking but it may work as a foundation. I simply ran a trace and at the end of the trace spawned a piece of floor. though i currently have no use for it, Its definitely an interesting idea I might look more into it

The thing I worry about in that case is just efficiency. Because that was my first idea.

A different approach might be a toggle-able ability where platforms are spawned underneath you as you run. But it would require some good logic to make sure you don’t spawn these things on top of each other.

You will want to build it first. Make it work. Then worry about the efficiency later.

Endless Runner tutorials (3D versions) may help with some ideas on how to get things in and out of the scene. You can start with those as a base idea, just reimagined for the player and not the screen size.

What I would do is have the weapon shoot out a limited range (say, 140 units) and spawn a “ground actor” at the point the line trace stops, sans collisions and such logic. Throw the spawned ground into an array related to the instigator so that you can keep track of it later. When the array gets to like 5000 or whatever arbitrary number you want on the index, destroy index 0, reorder the array. Or if you prefer, make the spawned ground like ice in a warm atmosphere and have it melt out in time, that way you won’t have to worry about it later. It will time itself out and auto-destroy (when coded properly).

If you really want to get fancy, have the “ground actor” spawned in according to the current impact point, with ramp-ups and turns and such.

would scaling work for you? holding down the trigger scales up an object from zero?

Not in this case, unless the player stands still I suppose.

Going to bump this up in case someone got a great idea on how to execute this.