Camera Rig features

I was looking at Character Controllers in LY docs i noticed there is also a Camera Rig gem or something like that. I Currently don’t use LY as i am still comparing some smaller features like that I wanted to if the Camera Rig has features like UE4’s Camera/Spring Arm and Unity’s Cinemachine?

I am mostly looking for a Camera Shake Methods and Spring Arm that handles collision with walls and stuff. Do they exist in LY?

Hi @HarisNauman :slightly_smiling_face:
This is a topic about Camera Shake in Script Canvas :point_down:


It’s really not too difficult to make your own “spring arm” via script canvas. All I did was shoot a ray from the camera to the character and if it hits anything then I move it up. Then I have a sphere cast at the camera and slightly behind with a specified radius and if there’s no collision then I move it back to the set distance I want the camera.

And for camera shake I use script canvas as well. I just change the cl_camera_noise and frequency values and then change them back after a set period of time.

All of this can be accomplished with very few “nodes” in script canvas.

The more complicated bit was the input to get the camera to swivel. I’m sure there’s a better way to do than what I did. There’s an example in Samples project. But I just used a horizontal and vertical “pivot” entity with origin set to what I want and then I use that rotation and clamp it where necessary for the camera.

I tried making my own Camera Spring Arm in unity long ago, I was raycasting from Character->Camera not from Camera to character, I guess i did that wrong but i don’t know how Raycasting from camera to character will work at the HitResult point would be at the other side if there is a wall in between.
As for Sphere cast I did not know about that thank you! i will try your method.

It’s just how I did it. I cast a ray from the cam to the character, ignore the character, and if it hits then I lerp the camera toward the player.

@HarisNauman Like the previous script canvas graph topic , I created a other script canvas graph and the result of the topic in a video , I hope it is useful, please see and let me know that, Is it useful for you :question: :point_down: