How can i move the box collider for a GameObject within a separate cube
I'm trying to link a GameObjects box collider with a moving cube so they move together in the same space.
The aim of it is to make the player chase the cube in order to open a door. When i place the Gameobject as a child of the cube they move together fine, but the door doesn't open. When I add the door as a child of the GameObject, the door moves with the Cube and I don't want that.
the gameobject has the animation component, box collider and script attached. Ive attached them to the cube as well but its not working, even with the cube as a child of the gameobject.
However when the Door and cube are a child of the game object, the box collider doesn't move but when the player moves through it the door opens.
is there anyone who can help with moving the box collider with the cube or do you know of any additional code i need to include?
Your answer
Follow this Question
Related Questions
How can I move a gameobjects box Collider with another asset? 0 Answers
List of unused game objects and prefabs 1 Answer
Making a gameobject follow a player closely 1 Answer
Box Collider for animating characters. 0 Answers
Player Win and Display on-screen restart options and start menu 2D game 0 Answers