Download

Cannot properly setup multiple camera angles in Character

Hello! I’ve got a problem: I have a First Person Character, and I want to setup an array of camera angles within this Character so I can switch between them. The thing is I need to setup these angles in world space, because each map is unique and I want to have one Character across all maps. So I made an array of transform values, they’re looking fine in my preview setup in construction script, but when I start playing game, the Character is obeying transform values from array, but doesn’t seem to have proper rotation. So it’s just switching Location, but not Rotation. I assume it’s because I’m trying to apply Transform to Capsule component. The reason I’m applying Transform to Capsule is because when I apply Transform to Camera - the controls are becoming messed up - WASD and mouse behaves like hell. I also noticed that when I switch to any camera angle and move the mouse - then when I switch to another camera angle - that my mouse movement was applied to this camera angle also. It’s so as if I’m rotating multiple cameras at once with my mouse. That makes me think that there’s something to do with Controller input… Does anyone understand what’s going on and how I can handle this? Basically all I need is to make a Character, which is a flying camera with an option to switch between angles presets and to fly inside a map.

Have you tried setting the location of the actor ( SetActorLocation ) followed by SetControlRotation?

Thank you thank you thank you, ClockworkOcean! Looks like that was the case. I’m still not sure what magic happened when I followed your advice, will now read the documentation about these functions, but at a first glance, everything works like as it is intended to be! Awesome, thanks, I had no idea what to do next.