Hi there everyone,
Me and my friend are hoping to piece together a short indie game between us. We want the day and night to change when the player collides with another plane (So its day in the beach and night in the forest for example). This is the script I’m trying to use:
`
</b>
<b></b>
var mat:Material;
<b></b><b></b>
<b>
function OnTriggerEnter(trigger: Collider){
</b><b></b>
<b></b>
RenderSettings.skybox=mat;
}
`
I apply this to the beach plane and nothing happens. I have also tried making the graphics for the first person camera a rigidbody and that doesnt help either. I also tried changing the script to:
``` ````var mat:Material;
``function OnTriggerEnter(trigger: Collider){
````Debug.Log("Hello World!");
}
`
And this doesn't log "Hello World!" on collision either. Anybody got any ideas on making this work? Its made me look a bit lazy because this script is my responsibility. I have spent hours trying alternatives and this seems the most likely to work out of any. Who thought such a simple script could cause so much trouble? I am quite literally at tether's end with this and I really hope somebody can help me out
Thank you for any help
Matthew