Why can't I get my flashlight to move up and down?

I tried making a flashlight for first person horror game I am doing.

This is setup in components:

http://puu.sh/6kA8S.jpg

And in blueprint it looks like this:

http://puu.sh/6kAl8.jpg

So why is it that light seem to move left and right as model does (Yaw) but won’t move up and down (Pitch)?

This is how i did my Flashlight setup:

First i added a spotlight component you can see how i attached it:

Then basic mouse input:

bp_mouseinput.png

And finally…Flashlight turning on and off:

bp_flipflop.png

Hmm, I will try move flashlight component so that it becomes a child of camera.

Yep, making light a child of camera solved issue. Thanks!

Think about what you are doing.

I’m assuming light is attached to root component - I can’t actually tell because your screenshot does not show me actual important part of interface. root component will rotate around Z (yaw) when player does. root component will not do so when player pitches camera, so light does not pitch.

Attach light to camera, assuming that camera component is actually one you are using. I’m not sure that it is, because it looks like view is clipping player mesh…

http://puu.sh/6kE4E.png

As for camera placement, I want it to be part of player mesh so that you can see yourself when you look down, but even if I say that 3P model should be visible it’s not visible in game. I thought about what I am doing a lot and it makes sense to me that when inputaxis is affected and I apply that to light it would move simultaneously.

It will probably work better if you create a Socket on 3rd person mesh and attach it to this socket, best place
is right next to weapon, then move it out a bit so it doesnt clip weapon. If you have multiple weapons, you may
have to setup a modification per weapon. As 3rd person mesh moves according to AimOffset, this should also
move your flashlight if you use that system.

edit
My Bad, connect it to Right Hand, with a Socket on First Person mesh, it will then follow camera
properly with no need for any functions to adjust it.

Hey SteeleDriver,

Thanks for your answer! But this is an old Archived post from our beta users, put here mostly for reference. I’ll be closing this post’s comments; please focus your answers on current issues users are experiencing. Thanks for continuing to help community, though!