Hello so i have the player able to pick up a cube. But when the player goes to the wall the cube docent stop at the wall it just goes through. I want the cube to stop at the wall. the cube for moving the cube to the player is:
Put another camera as a child of the main camera.Make a new layer. Set the child cam’s culling mask to that new layer. Set the depth of the child camera to 1 and Clear Flags to ‘Don’t Clear’.
Then, once picked, change the picked objects layer to the one you made the child camera see.
Here’s what the function in my ‘Pick_Me_Up_Bro.js’ looks like.