Ships positions are in the wrong place

EnemyProb

This photo is taken after the enemy animation was played. They all just teleport to the spots on the photo and continue from there, it is not the shredder because if i move the shredder any more up lasers will never be deleted

How to fix?
It cant be my transform because i set it to the spot of the position as you can see i have another ship that is set to the position
It cant be the shredder
It cant be the script
Whats wrong?

Do the ship prefabs have a transform x,y position of 0,0?

Yes

If you disable the animator(untick the box) on the enemy prefab, do they appear where you would expect them to?

Yes, they all start spawning in one by one as usual

Ok so the animation is what is kicking them out of place. Check the last keyframe of the arrival animation. This should end with them being at the transform position of [0,0, z]

Yes it is still not working though
Here is the project file if you would like to take a look

Space Defender Problem.zip (2.5 MB)

You don’t have an idle animation set so it’s causing it to break.

How do i set it?

Just create a new animation with a single keyframe from the transform position of [0,0,z] and then attach it to the idle state in the animator. When you click idle you should see the animation on the inspector pane

I dont understand

Are you able to show in a video or something?

Select the enemy you have in the scene at the moment.
In Animation click the drop down and create new clip
Call it something like Idle
Now on this clip add curve for transform -> Position
Go into the Animator and now create a transition from Arrival to this new clip
Delete the old idle clip

That should fix your issue.

1 Like

Thanks so much!!

Bless you sir

Now that I watch just slightly past this point in the videos the idle animation is explained…but thanks anyway otherwise I may not have watched further thinking I was stuck

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms