I never tried this before, so i want a little help and some hints to how to do this.
I am making a scene in where you wake up in the dark and need to find a light source. The light source will be a torch in a wall or in the ground (this doesn’t matter).
How i make a “pick up system” so when i approach the object and press “E”, the torch disappears and then it appears in the hand of the character? It’s in first person.
It should be a simple script that makes the object disappear on trigger and then reappear on a custom location right?
Ok tnks :)
– Zitoox+1 also consider Physics.SphereCast if you want to be forgiving about where the player looks, to give some wiggle room, or if you're going to be super forgiving and just need to make sure it's visible you can just check if it's visible in the camera using [renderer].isVisible.
– Alec-Slayden