I have an imported model which is meant to be “placeable” in the scene by the player. Basically the user can select the object from a menu then until it is placed, it follows the cursor on the floor, then remains in a certain place once the user clicks. This works completely fine for all my imported models apart from one. (The position of the object is determined by casting a ray from the camera to the cursor, then checking for collisions btw).
The model in question is a door and has an animation attached. Instead of following the mouse, it just stays at (0, 0, 0). Does anyone have any experience of such an issue? I have tried everything I can think of to solve this and have now spent two days on this alone.
I have created an empty gameobject that the animated model now resides inside. All other models are fine and if I remove the animation this door is also fine.
I know the object moves to (0, 0, 0) every frame, because the function I use to move the item (via the cursor) is called every frame. At the start of this function (called placeItem()) the position is found to be at (0, 0, 0) and at the end of the function the position is correct. All other objects use the same function and in their case the position at the start of the function is simply where the object was at the end of the previous function call. However the door object is constantly rendered at (0, 0, 0) regardless of framerate.
Any help at all will be incredibly useful!