How I can make an camera collision?

hello guys, I have an question, how I can make an camera collision with script canvas ? this is possible ?

1 Like

Hi @VitorSantos2 :slightly_smiling_face:
Welcome to Amazon Lumberyard :rose:
Your work is great , I tested for both PhysX & CryPhysics , result is nothing , I think , It is not possible for Physics Lib in Script Canvas 1.25 :blush:

1 Like

I tested this question in Starter Game LY 1.25 , The camera player goes into the objects of the collider :wink: Like your game where the camera goes into objects :white_check_mark:

1 Like

Thank u dude,I use the new version 1.26.0 in start game too, I wii try, make anyting to this working, so thank you again

1 Like

One way to do this is shoot a ray between your camera and player. And if there’s anything in the way of the ray then interpolate the camera toward the player until there isn’t.

1 Like

u can show me how I can make this ?

@VitorSantos2
soon I upload a video help , of course my graph is not complete :blush:

If there’s anything I’ve learned about game development it’s that it’s ALL ABOUT THE RAYS.

@VitorSantos2

You should be able to add a collider to your camera entity. If your buildings are using PhysX colliders, add an appropriate PhysX collider to the camera ( I’m assuming your character is using the character or rigid body colliders). If the buildings use legacy physics, attach a legacy collider to the camera entity.

You can also use collision groups with PhysX to make the camera collide with buildings, but not say, light posts.

1 Like

Hi @VitorSantos2 :slightly_smiling_face:

Sorry for delay , But these days I am really busy because schools have become online/virtual, my work has increased a lot.

This is a raycast answer script canvas graph zip file for your request :point_down:
CameraCollisionAhmadKarami.zip (30.9 KB)

Please see this video , how to use my graph :point_down:

I hope it is useful for you

1 Like

thank you @_AhmadKarami

2 Likes

@VitorSantos2 You’re welcome, dear brother, for a Great Brazil :rose: :slightly_smiling_face:

1 Like

Hi Gents, don’t forget to mark an issue as “resolved/solved” when someone offers a solution. This will help community members get the new badge for providing solutions!

1 Like

@lmbr_Saulty I agree with you completely :100: % :white_check_mark: Your good tip helps the new members of community a lot :slightly_smiling_face: