Runtime change of texture based on the POV of the player

Basically what I want to do is have a video texture change within the game when the person views the object that the texture is applied to. I think I can manage the runtime texture change but can this change happen based on the POV of the camera - like if x=co-ordinates y=co-ordinates then

Onstart()
{
gameobject1.renderer.material.mainTexture = newTexture;
}

Does that make any sense?

so if your player is looking at “thing x”, “video x” plays in the UI or somewhere?

Yeah like say if there are 2 televisions playing movie textures in the scene, the texture that they are playing changes as the player looks from one to the other.
I guess I want the players view to start the video but then to change the video if they look back at it again

I’d probably go with a trigger collider to detect the player being close enough to interact.

Assuming a FPS style player; you can then check the angle difference between the camera.main.transform.forward and (camera.main.transform.position - transform.position) i.e. the line between the object and the camera to see if the camera is pointing in it’s direction (I’m always getting things like that the wrong way around, might be “transform position - camera position” but you get the idea)

You’ll need to handle “looking away” so you know if it’s “still looking” or it’s a “new look”. Should be able to do that simply enough with a boolean.

Hey, thanks for the replies. For what I’m thinking the players camera would be fixed, I was thinking of fixing a object to the camera’s center so maybe I work a trigger collider through that, maybe overcomplicating things though. The camera.main.transform.position - transform.position sounds like the place to start.
Thanks again

http://benoculus.com/unity-3d/scripts/load-movietexture-and-play-video-on-a-gameobject-at-runtime-in-unity-3d-pro-only/

Found this blog that pretty much answers the question, just in case anyone stumbles across this,