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.
Lol, exactly what I was thinking of 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.
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++.
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:
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.
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
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.