- Home /
Prefab instances all moving to one spot instead of staying put.
Hi guys,
I have a prefab of a moving platform with a collider parented to it (so my character doesn't slide off). The platform moves via animation straight up and down. It seems to work great....until I make it a prefab and instance it.
While the instance works fine (as far as moving up and down), the problem is as soon as I click the Run button all instances (except for the original platform) move to a certain place on the map instantly and animate there (they all go to the same place too). As soon as I hit stop, they go back to where they should be.
Does anyone have any idea of what it could be? None of the scripts to control them have anything to do with translation and the spot they all move to is just some random spot off to the side.
Answer by chrono1081 · Jun 13, 2011 at 04:20 AM
Thank you so much for the help :) I was still having problems but I may have just solved it. Some more testing will let me know for sure.
I just made a prefab where everything was zeroed first position wise (the moving platform) and then had the animation added and edited, and then I made an empty game object that was zeroed and then added the platform and animation to the empty game object and it seems to be working knock on wood.
Is this the case then? Everything needs to be zerod when making prefabs of animations?