I'm sort of new to creating complex prefabs, and am having a couple of issues that I think are just a result of my inexperience. My prefab is made up of three parts:
- Turret Top
- Base for the Turret
- Dummy Node (used as instantiate point for projectiles)
The "Turret Top" object carries a script which handles rotating itself to track the mouse, firing projectiles, and attaching the dummy Node to itself. It is also the top-level of the prefab. The other two items show up beneath it in the Project view. TBH, I'm not really sure what the significance of hierarchy is here (and probably should).
There are two issues I'd like to solve:
- When I instantiate this prefab, it uses the pivot of the Turret Top object for placement. I'd prefer to use the pivot of the Turret Base. Is there a way to do this? Should I just re-build the prefab with this as the top-level item, or does that carry other ramifications?
- When my Turret Top is rotating to track the mouse, the Turret Base is moving with it. Can I tell my prefab not to do that? I just need the Base there visually, and when I create my "real" art I'd much rather just build two meshes and rotate one completely, as opposed to having to create an actual animated object.
Jun 09 '12 at 05:39 AM