You know what i’m talking about, the classic movie trick, or hell even sometimes in games, you look at the hallway and realize it’s a dead end, you turn around and suddenly there’s a wall behind you.
How would i go around doing that? i know how to do the wall thing, but making it so when looking at a specific location triggers a change?
We start interacting with it when the player enters the TriggerVolume. We then trace from the camera forward - so where the player is aiming. If that trace is blocked by the SweetSpot, we spawn something 500 in front of the wall (hopefully far enough that it ends up behind the player). And then close the gate so we don’t spawn more objects.
This is by no means a complete system but it may give you an idea of how to approach creating a feature like this. And there are many, many ways of accomplishing that, surely. My aims here was to make it somewhat modular so you can plop more than one of those anywhere and it would just work.
you look at the hallway and realize
it’s a dead end, you turn around and
suddenly there’s a wall behind you.
I think I misunderstood it somehow, my bad. In this case it’d would be a matter of the player entering a collision volume that spawns something behind them.
but making it so when looking at a
specific location triggers a change?
You can trace, when the trace hits the sweet spot, you replace whatever is behind the player. Ideally, you combine the 2. You start tracing when the player is in a specific volume.