Render to texture on a weapon?

Anyone done this? I’m talking about weapons that render a camera to a material that is displayed on the weapon itself. My own use is for an optiwand (swat 4 style), but I could see this being useful for things like sniper scopes that actually render different views, or endoscope type items.

I’ve tried using a scenecapture2D component, but this seems to have issues (it looks like it uses the current player camera settings or something, so you get some weird motion blur going on on your player camera). I’ve set the scenecapture2D up with a render target, which it DOES seem to render into. However that didn’t seem to render onto the weapon itself correctly.

So I guess my question is:

Is scenecapture2D the right way to go about this?

I am wondering if the render texture target can be a dynamic texture somehow. Because I don’t want a single texture, but one-per-weapon (my NPC’s all have optiwands too).

How do you disable a scenecapture2D component so that it doesn’t do its render to texture? I’ve got to “activate” my optiwand to enable its work (which locks the player in place and moves the scene capture around instead).

Not asking exactly how to do this btw. Just wondered if anyone had come across similar issues and had any experience.

Ta.

Look under the show flags for the scene capture 2D, you can really customize how it captures the environment by selectively disabling deferred lighting, shadows etc.

I don’t see a way to actually disable the scene capture component, but you could easily have a material parameter that switches to a solid color. You could also toggle show flags to turn stuff off, but that seems like a heavy handed solution.

I believe you’d need a separate texture target per weapon.