Download

Manipulating walls in game

I’ve been racking my brain for a while over this one!

I was wondering if there was any way (using Blueprints) that I could “push/pull” the walls to change the shape of the room. So for instance a rectangular room could be resized by grabbing a wall and pushing it away from the player, or pulled towards.
This would also have to stretch the connected walls with it so that they are all still attached.

I’d be grateful for any assistance!

UE4forum.jpg

There are a few approaches you could use to do this but I think they are nearly all case specific.

Have a look into Splines and Spline Mesh generation, people use it usually to build roads and fences but you could adapt it to spawn walls along its length, then you need to think about how the user will interact with this in game, for example in a first person project does the user click the wall then walk towards it to move it back?

If it does this then you need to update the spline end point while the player is moving (probably just in one axis like x or y, or z for a ceiling i guess).

It will be nearly impossible to use static lighting with any method you try use, so youre going to be stuck with dynamic lighting.

This does mean however you could also scale a wall mesh as dynamic lighting means you avoid problems with static lighting shadows stretching because of stretched uv’s/geometery. But dynamic lighting is not brilliant for Arch Viz.

Sorry if this is not articulate I am just brainstorming ideas