Camera Shake z position issue in 2D Space Shooter CameraShake Script

If the main camera z position sets to 0 during the shake, change the camera shake start method initial position to transform.localPosition:

void Start()
{
initialPosition = trnsform.localPosition;
}

1 Like

:thinking: It seems as if you may have posted this from the video page…but your post actually goes to the main forum for other people to look at so we can help you.

Ergo, there is no context as to what you’re doing or trying to accomplish, or even what lesson or course you’re working in.

Can you please give more details?

Also, posting a sample of your code using three backtick marks…

` <–Three of these

ThreeBackticks

It really helps us out.

if (three Backticks) {
     Debug.Log("We can read it easily");
} else {
     Debug.Log("We cannot read it as easily");
}

Privacy & Terms