Scripts / Fix third person clipping

Author
Message
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 10th Jun 2019 13:20
Hey guys,

I work at the moment at third person and I know the reason for the clipping.
At the moment the cam checks for a collision and if it find one it sets the camera on this point.

The problems are:
1) We not always find the best point for the camera, because the raycast override the point
2) The cam has a field of view and is not a point, so we need to set it a bit in front of the collision point

My try is a bit strange (at line 1402 in gameplayercontrol):

It is a bit better now with terrain collision, but entity collision is still broken on the right side.

Maybe someone can point me a better way or a way to improve this

Thanks
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 10th Jun 2019 15:28 Edited at: 10th Jun 2019 16:02
the problem is the over the shoulder code which automatically offsets the camera to the right a bit which is why it appears to only effect the right side, if you move the offset to a negative the left side becomes the issue so the fix is simply to take the offset into account when updating the camera,
basically this part is not taken into account when the code is run

the variables make no sense to me so i'll let you see if you can fix it

edit; here's a version that will help a bit but definitely not ideal, would be better to take the camera's (ideal) final position into account before the ray cast is done rather than just moving the camera by it's x offset without any care... but this will at least do a temporary fix
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 10th Jun 2019 16:42
I do not use the offset at the moment. At my testmap the offset is 0.
Something I want to think about later, when the cam find a good point.

Quote: "the variables make no sense to me so i'll let you see if you can fix it"

I think this is the problem Even mine make no sense. It works a bit, that´s all I can achieve so far
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 11th Jun 2019 01:48
Well looks like you have nailed the problem which is a great start
It really is an annoying issue ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 11th Jun 2019 16:23
I think I fixed it.

@synchromesh you have a pm with the final fix. Please test it
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download

Attachments

Login to view attachments
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 12th Jun 2019 02:13
Tested and working brilliantly … Great work !!
sent you a PM with a video link
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM

Login to post a reply

Server time is: 2024-04-24 20:33:43
Your offset time is: 2024-04-24 20:33:43