TrianglesHappen
Member
As the title states, I cannot set the spawn position and rotation of my weapons. Every weapon I have (four in total ATM) will spawn exactly the same. With the "Z" axis (local position/rotation) pointing straight up to the sky. This presents an issue as I'm using the Third Person Controller and the weapons must have their local Z axis pointing in the Look Direction to fire accurately. The only thing that works is the scale, the scale of the object will always stay to what I set it as. The position and rotation always get reset and the Rotation always end up being one of these two (180, 180, 180) or (0, 360, 0) in the transform of the prefab object.
I've tried the following: - just to mention, I position the weapons when in play mode just as in the videos/docs. Then copy the values to the prefabs at edit time.
1. Change the orientation of the prefab child objects. This will not work as the parent object that gets spawned on the player will always point Local Z up to the sky, so no matter the orientation of the child objects ( rotating them to face forward even though the parent is facing up) the weapon still will not fire.
2. Setting the position and rotation of the Prefab object itself (so the main/parent object transform).
3. Setting the "Local spawn" position and rotation in the "Third Person Perspective" script.
4. Reworking the prefabs due to the pivot point being far away. (maybe 5-10 unity units @ scale)
Anyways, only the scale saves and the position/rotation just reset to what I mentioned above.
As a side note, I noticed all of my prefabs "Pivot" point ends up far away from the actual object center/transform 0, 0, 0 point. This is consistent with all of the weapons prefabs. They were all created using the item manager as the integration video describes. I just have to remove the parent object from the prefab and put another empty game object as the parent and it fixes it. Not sure if it's my models or the manager. Easy fix to that one though.
I've tried the following: - just to mention, I position the weapons when in play mode just as in the videos/docs. Then copy the values to the prefabs at edit time.
1. Change the orientation of the prefab child objects. This will not work as the parent object that gets spawned on the player will always point Local Z up to the sky, so no matter the orientation of the child objects ( rotating them to face forward even though the parent is facing up) the weapon still will not fire.
2. Setting the position and rotation of the Prefab object itself (so the main/parent object transform).
3. Setting the "Local spawn" position and rotation in the "Third Person Perspective" script.
4. Reworking the prefabs due to the pivot point being far away. (maybe 5-10 unity units @ scale)
Anyways, only the scale saves and the position/rotation just reset to what I mentioned above.
As a side note, I noticed all of my prefabs "Pivot" point ends up far away from the actual object center/transform 0, 0, 0 point. This is consistent with all of the weapons prefabs. They were all created using the item manager as the integration video describes. I just have to remove the parent object from the prefab and put another empty game object as the parent and it fixes it. Not sure if it's my models or the manager. Easy fix to that one though.