Download

Power Up which Changes the Camera Settings

I’m having issues with casting correctly to the camera to alter the value based on when my character picks up the item. The main character always successfully connects with the object, the problem I’m having is that the cast to moving camera, which is my main camera, always fails, printing the failed string, and no matter how many things I try plugging in to the moving camera object it never seems to work.

ab27e7daad81762466a1f016190cacece9da0458.jpeg

I managed to successfully make a power up in which the character speeds up for a few seconds, but this time I wanted to have the camera zoom in, dictated by the zoom function from the moving camera blueprint shown below.

831aa706cfb0189f7b263b11bbd2149977510b30.jpeg

Ultimately I want to cast from the powerup, which is spawned AFTER the game begins, so it doesn’t actually exist at the point of spawning, since it’s for an endless runner game that’s procedurally generated, to the camera that is always present.

Any help would be really appreciated since I’m not really sure where to take this at the moment.

Your camera is part of your character or pawn, you need to cast to the character and call the function that is setup in the character to zoom the camera. Your camera should probably be a component of you pawn or character, not an actor.

Here is a blueprint that will provide you with a smooth zoom in and out feature. When I think of this feature I think about zooming further out quick and then having the camera catch up. Either way this works and you can change the speed it zooms in or out independently. 3802f3f32ab28b433da9caf10500a1cba9f6edad.png 4e6ffcc5aa4e7f890a47a2b2511b08d7efac423a.png63ffd486b76679fcc99f306f43100f56089dd07e.png

-James