Can't adjust Truck Camera relative location

I'm currently working on adding trucks to my first person vehicle mods, but I've encountered a bit of an issue. With all other vehicles the camera is directly at the end of the camera (image 1) On the truck it's attached slightly above the spring arm (image 2) I've been moving the spring arm with the function shown in image 3, which works perfectly fine. However, using the same code to adjust the camera position (image 4) does not work, and I don't really understand why. The references to the truck's camera and spring arm are done as shown in image 5 The reason the camera needs to be moved, is because to get the correct rotation, the spring arm needs to be set to a target length of 0, which means it'll rotate around the origin of the spring arm. But since the camera is attached a considerable distance above the spring arm (175cm) it means the camera is just way too high, and the rotation doesn't work out.
No description
No description
No description
No description
No description
Solution:
The truck spring arm has a socket offset, which none of the other vehicles have. The camera movement was being applied, there's just an additional offset on the springarm...
No description
Jump to solution
14 Replies
The Urban Goose
The Urban GooseOP2mo ago
I still have not been able to solve this I've now tried attaching an intermediary arrow, attaching the camera to that, and then moving the arrow instead of the camera, which also didn't work I've got absolutely no clue what's going on, Maybe there's a C++ function overwriting the camera position? I've also tried to add a new camera and swtiching to that, but that also didn't work
Rex
Rex2mo ago
Only thing I can think of: are the components movable?
The Urban Goose
The Urban GooseOP2mo ago
Pretty sure they are, the camera does move when I change the spring arm location and length, but I can't move the camera relative to the spring arm
Rex
Rex2mo ago
Oh, maybe the camera is attached to a socket on the spring arm?
The Urban Goose
The Urban GooseOP2mo ago
Parent Socket on the camera in the truck BP is none
The Urban Goose
The Urban GooseOP2mo ago
This is the problem:
No description
The Urban Goose
The Urban GooseOP2mo ago
But I can't fix it The camera has a relative location of z = 175 Meaning it's 175cm above the end of the spring arm All other cameras are at (X=0, Y=0, Z=0) None of the other cameras need to be moved, so it's not an issue for them I'm gonna take a break from this for today, I've spent like 6+ hours total debugging this stupid problem I've tried every method of moving this damn camera I've tried adding new ones This camera is R E A L L Y annoying me now...
AnotherFireFox
AnotherFireFox2mo ago
I have no idea how UE work, but if I'm allowed to contribute ... how about placing the spring arm on another downward 175cm long rigid arm to negate the offset? The origin of rotation should be on the rigid arm, in this case.
The Urban Goose
The Urban GooseOP2mo ago
Honestly not a bad idea, that could potentially work I also had another idea on how to solve it this morning So that's two more methods I've got available to try and make it work And I've just thought of a third potential solution as well I'VE SOLVED IT It was solution 4: something I foror 💀 about
Solution
The Urban Goose
The Urban Goose2mo ago
The truck spring arm has a socket offset, which none of the other vehicles have. The camera movement was being applied, there's just an additional offset on the springarm
No description
The Urban Goose
The Urban GooseOP2mo ago
So this issue is officially fixed @AnotherFireFox
The Urban Goose
The Urban GooseOP2mo ago
I do wanna point out that this message got me thinking about spring arms again, and is what caused me to remember the spring arm offset exists, so thank you for that one 👍
AnotherFireFox
AnotherFireFox2mo ago
That's really happy to hear! Glad to be helpful lol
Want results from more Discord servers?
Add your server