Godot Version
4.3
Question
I am having a problem with the springarm when it collides with a character it doesn’t function the way I would like it to. Unfortunately, I just don’t know enough about the springarm to find a solution. I am sure I am adding to the problems by using the wrong layers/masks, but, I am trying. I did try playing around with the margins but whatever I did didn’t seem to make a difference. It is hard to explain just what it is doing so in lieu of a explanation I have a video displaying on YouTube showing exactly what is going on:
Video here: https://youtu.be/mrMJq-HxXow
I anyone can help give me insight into this problem or fix it, then here is a huge thankyou in advance.
There is also a problem with the camera on the springarm clipping through the walls is some places I am hoping that if I can solve the problem above this might also be rectified too.
Regards.
What is the problem? What do you like to happen?
Well, the problem is that the when you go in front of the Rogue character (aka Robin Hood
) what happen when you walk back towards him you see into his skull
. Also seeing the texture used for the Rogue when you turn around and walk forward again. If at all possible I would like to stop that happening. I thought the margin might stop that from occurring either by pushing the camera to the side or stopping the springarm from moving but I was wrong, diddly wrong.
That what I was trying to show with the video!
Can you maybe have the camera get pushed up instead of in towards the character?
It’s worth noting here that 3D dynamic cameras have been an absolute bugbear for games since forever.
1 Like
Preventing clipping is certainly tough, for your camera to not clip into the knight means you will have to not allow the knight to clip into walls/other characters. The camera is pressed up against the other character and has nowhere to go, but the knight is able to move slightly into them thus showing the other side of the polygons.
1 Like
The camera can move around up/down/left/right it just that I remember being able to do this in Unreal. And for what I recall, once it was explained to me, it was rather a simple affair to rectify, but, it was a couple of years ago. After which I was playing music full-time and have forgotten what it was that I did to get it working. I will remember about moving the camera up, that may work when I try it again in the future! Thanks for that.
My problem was thinking that the springarm itself would move when was it was blocked. I have the springarm masks set to character layer of ‘9’ and the walls at ‘20’ - so, for the most part, I repeat most part, the camera doesn’t end up outside the wall it does in some instances though (end of a hallway), but, the character though doesn’t seem as though I can do anything to stop it, unless I put some sort of collider around the character and code the playable character to stop moving in that direction or move the camera up (like @hexgrid said. Which at my current level is a lot of trial (a lot) and error. Someone mentioned culling, so, I tried turning off layer 9 in the camera culling, but, it didn’t do anything different.
Might have to put that on the back-burner for now. And come back to it later.
Thanks for the replies guys gave me a lot to think about.
Just a quick update with the springarm, I accidentally came across an inbuilt function thanks to tip from a Discord server:
that enabled me to get the length of the springarm after it had been interfered with by an object (in this case a Character 3D) if it is got below a certain threshold just turn off the visibility of the character, initially, I just wanted to turn off the mesh, but, no mesh property seemed to be available for the character set I bought online, but, turning off the visibility did the trick no more seeing inside the character and seeing the textures that made up the head and body.
Probably not the best solution, but, it achieved what I needed it to right now.
1 Like