How to make automatic change of camera position from Static mesh?

One second

My bet is that OP wants this:

Automatically adjust the springarm length to ensure the object can be always fully seen, no matter its size. Maybe. The description is somewhat fuzzy. I might be off…

1 Like

Well, yes.

That was exactly what I was showing.

I think they got confused by the slider? I only skimmed the thread. @fsoner Do we need a slider?

Yes, I need that, is that how your code works?

No, we don’t need a slider. It was the slider that confused me.

Slider was just for the input.

Could you tell a bit more about how this is going to be used?

  • are you going to have 1 object and 1 camera only, ever?
  • or we’re going to select another object, elsewhere?
  • switch some cameras around?
  • what decides the scale of the object?

Is this like a gallery? If we do not know enough, it’s hard to advice on something that fits right into your vision well enough.

No and no


If I tried to read you mind, would it be correct to say that you want to punch in the scale manually into widget fields?

image

No and no

That’s great but not helpful at all. Help us help you. Without knowing how it works, there can only be more confusion.

Yes, I want the user to fill in the numbers in the X, Y, Z fields themselves
In the last photo you can see that the cube didn’t spawn, I had to move the camera manually, and I want it to be like the GIF you sent me.

Read the largest component of the vector and apply it to the springarm length:

Could you please tell me what this Blueprint refers to, and what variables are needed, etc.?

This blueprint refers to the actor that has the Static Mesh Component (cube) and the Camera Component attached to a Springarm. No variables are needed.

You’re trying to connect an actor to a node that takes a component:

image

No, you need to make actor that will have 3 components:

  1. Cube
  2. Spring arm
  3. Camera

And execute this code on tick.

1 Like

I did it like this, I added it to an existing cube, I’m afraid of breaking the previous code, how do I make a component that would fit the function?