Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: appTester4587 on March 02, 2019, 05:14:03 PM

Title: TPS Camera Collisions
Post by: appTester4587 on March 02, 2019, 05:14:03 PM
Hello,

I have searched left and right for a tutorial that would cover this system but none is available for what I am looking for. I have the camera setup but I do not know how to setup Camera Collisions. I have tried Raycast/RaycastAll, store it and then to move camera forward but I was not successful. If anyone know a tutorial that I can watch/read please let me know.

Thanks!
Title: Re: TPS Camera Collisions
Post by: Schleckenmiester on March 03, 2019, 01:26:12 AM
Sorry that this isn't an answer to your question but I too have this problem and would like to know.
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 05, 2019, 07:40:59 AM
Anyone?
Title: Re: TPS Camera Collisions
Post by: djaydino on March 05, 2019, 11:52:30 AM
Hi.
If you find some unity tutorials i can have a look if i can 'convert' it to playmaker.
Title: Re: TPS Camera Collisions
Post by: Schleckenmiester on March 05, 2019, 02:27:58 PM
Quick search and I found this. (https://www.youtube.com/watch?v=LbDQHv9z-F0)
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 05, 2019, 04:50:09 PM
Hi.
If you find some unity tutorials i can have a look if i can 'convert' it to playmaker.

He has far more than just camera collision here:


But I find this the best so far and first time I got exposed to SphearCast instead of just simple RayCast.

If you can convert that to PM that would be sick.

Thanks!
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 07, 2019, 07:26:37 AM
djaydino, any update on this?
Title: Re: TPS Camera Collisions
Post by: djaydino on March 07, 2019, 10:43:01 AM
Hi.
Sorry, did not have time yet, but i did have a look at the video and i will try to make a video or action after the weekend.

bump again by Tuesday if i did not reply yet.
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 07, 2019, 07:03:37 PM
Hi.
Sorry, did not have time yet, but i did have a look at the video and i will try to make a video or action after the weekend.

bump again by Tuesday if i did not reply yet.

Sounds good.
Title: Re: TPS Camera Collisions
Post by: jeanfabre on March 12, 2019, 02:18:35 AM
Hi,

 Camera collision is likely handled best with Cinemachine as it automates the process. https://forum.unity.com/threads/cinemachine-camera-collision.515626/

 what do you expect as a camera behavior should it collide with something?

Bye,

 Jean
Title: Re: TPS Camera Collisions
Post by: djaydino on March 12, 2019, 06:30:28 PM
Hi.

i made 2 actions for it to work properly and i have setup a sample scene.
you can get it from the package below.

Let me know if it works.

Edit : Removed the package due to lack of interest... actions will be available on the Ecosystem
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 13, 2019, 11:12:43 AM
Hi,

 Camera collision is likely handled best with Cinemachine as it automates the process. https://forum.unity.com/threads/cinemachine-camera-collision.515626/

 what do you expect as a camera behavior should it collide with something?

Bye,

 Jean

Cinemachine is not good for what I want it for.
Title: Re: TPS Camera Collisions
Post by: appTester4587 on March 13, 2019, 11:21:35 AM
Hi.

i made 2 actions for it to work properly and i have setup a sample scene.
you can get it from the package below.

Let me know if it works.

djaydino, from the import I can see those are C# scripts. I can do this in C# but I wanted to do this in PM only.
Title: Re: TPS Camera Collisions
Post by: djaydino on March 13, 2019, 06:42:41 PM
Hi.

Those are 2 actions, actions are build in c#

you can see that there is a scene also. open the scene to see the setup.
Title: Re: TPS Camera Collisions
Post by: djaydino on March 17, 2019, 12:07:42 PM
Hi.
Did you try the sample?
Title: Re: TPS Camera Collisions
Post by: Odd_But_Awesome on April 23, 2019, 11:25:28 PM
Hi.

i made 2 actions for it to work properly and i have setup a sample scene.
you can get it from the package below.

Let me know if it works.

Edit : Removed the package due to lack of interest... actions will be available on the Ecosystem



Hi there,

@djaydino

What is the name of these actions please? Or link to package.

I am currently struggling with a 3rd person Playmaker camera collision issue. Zoom in/out works but at closest point camera jutters.

Thanks! :)
Title: Re: TPS Camera Collisions
Post by: djaydino on April 28, 2019, 10:08:18 AM
Hi.

GetCameraClippingPlane and SphereCast2
Title: Re: TPS Camera Collisions
Post by: drakwon on September 08, 2019, 12:38:57 PM
I have an easy solution for this with no extra actions needed.

Step 1. Create a box collider right under your camera.

Step 2. Add an FSM to the box collider,  set it to trigger when it collides with the terrain

Step 3. Create a variable for your mouse Y Sens and when the box triggers have it set your mouse Y sens to 0

Step 3. Get your mouse Y axis input, compare the float, if its greater send to to another event that sets your sens back to normal.

If your terrain isnt flat, use a raycast to detect the position of the terrain and set your cameras y position to that and it will follow the terrain level



you wont get any bouncing camera effects with this method