How to add slider control to a actor with cam+springarm

Hello people!

Ive been trying to make a system that the player can move a camera around an object with two sliders. Yaw and Pitch, tried alot of different things. Followed tutorials and looked online, even used AI.

Its also fair to say that I’m kinda new to this program.

Found out I could make an actor with a springarm+cam so the camera is a few meters away from the specific object. And even made a ui with different sliders.

So far so good. But everytime i try to make a system that converts the sliders to rotation angles i get stuck with things that aint working.

I cant find anything that could help me.

Already alot of thanks for the future help/info!


This should be pretty straight forward to do:

  1. Disable camera boom from inheriting controller rotation
  2. Pass the camera boom component to your Widget
  3. Rotate the component in the Widget

This works for the camera of the ThirdPersonCharacter. Now if you are trying to manipulate external object, make sure the proper scene component is sent to the widget.

Thanks for the fast reply,

Followed the step but i cant find the component input on the create widget node?

  • “This works for the camera of the ThirdPersonCharacter”

Is this a premade blueprint? or can i just use a CameraActor with Springarm/Pawn with springarm?

Probaly missing something.

Thanks again.

Followed the step but i cant find the component input on the create widget node?

In the widget class, create a object variable that is of your orbit cams´ type (so “BP_OrbitCam” if I’m correct). Then make the variable “Instance Editable” and “Expose on Spawn”.

You should now see the component variable argument on the “Create Widget” node. If not, rightclick → Refresh Nodes. This is where you pass in your camera boom component or any other actor component that you want to alter via the widget.

Thanks, that indeed added the component input.

Now only when i try to add the component variable it autofills in another node between the 2 points. And the springarm cant connect to the component node.

When i tried doing this on my own i always tried to use a actor with a springarm+camera, the only movement the player is allowed to do is to control the sliders to look around the object.

(im trying to create an idle like game, that you can decorate your own little pond and use sliders to “create” your own position/viewpoint)

The solution @dZh0 proposed uses a pawn with a camera on it? Is that the right solution for the thing i want to do, im kind of obvlivious of what im doing, maybe i should have explained it better beforehand. sorry…

When i click play the UI also doenst show up, do i need to put that “add in viewport” nodeline in the pawn itself or in the overall blueprint level.

Like i said before, im trying to grasp it all but its kinda slipping trough my fingers hahah..

thanks for sticking with me!

Sorry you’re right!
Make the variable type that is exposed a “Spring Arm Component”, not a type of your class.
My fault :slight_smile:

ty for the fast reply. That worked!

Now everything is connected, the only thing left is when i click play i dont see the sliders.

When i click play the UI also doenst show up, do i need to put that “add in viewport” nodeline in the pawn itself or in the overall blueprint level.

Try to breakpoint the “Create Widget” node with F9. Is it being executed? “Add to viewport” is necessary, yes. I suspect that “Event Possess” isn’t being executed. Is “BP_OrbitCam” set as the default pawn in your Game Mode? When you PIE (Play in editor, i.e. press play), do you see the direction your spring arm camera is facing? If not, it’s possible that you actually don’t possess your orbit cam class.

Thanks,

The only thing i had to do was set the auto posses to player 0

again and again thanks!!! this was driving me crazy haha.

Link to video example

1 Like

With pleasure! :slight_smile:

Good luck with your project! Sounds fun :slight_smile:

1 Like