0
Answered

Collisions Activating; but not Stopping at Walls

Brandon De VITO 5 months ago in Game Creator updated 5 months ago 2

Hello All,

First let me say thank you. I'm enjoying the tool-set immensely, and am finally making headway on the ARPG I've been sandbared on for the last year. That said...


I'm having a terrible frustration with the Camera Motor's Wall Collision Settings.

I've now tried my existing project in 2018.4 and in the 2019 branch, and it has the same results. The Camera collides with a wall, the character zooms in slightly, and then the camera passes through the walls anyway. The system is definitely detecting the collisions however the programming doesn't seem to zoom far enough into the character to not avoid clipping through the wall texture. It's proving to be... very frustrating.

Does anyone have any suggestions? I tried the same environment with my 14$ camera collision raycast script. And I tried the Ultimate Character Controller from Opsive, and both are handling the wall collisions correctly.

I would appreciate any advice on getting the Camera to actually press into the character in order to avoid the collision. I noted that when I created an over-the-shoulder camera, which was only about two feet from my character, the zoom function was substantial enough to avoid it.


I would even be happy to create a second motor and transition between the two on Motor collision with the wall if I knew how.

Again, any help would be wonderful.

Unity version:
2018.4.19f1
Game Creator version:
1.1.8
Answered

Thanks for your kind words. The amount of "zoom" the camera can do due a collision is defined in the "Zoom Limits" field inside the camera motor.

By default, it's set to 1 and 10, which means that the camera can zoom in up to a distance of 1 unit to the player due to a collision. This is because some times it's preferable that the camera gets inside the collider rather than inside the player's model.

However, you can change this value to something the zoom limits to something like 0.1 and 10 and it will behave like other camera collisions. If you still encounter any issues, feel free to post them below.

I'm grateful for the quick response. I had to wait until this evening to check the results. 

I'm sad to say that the above settings don't do the trick. More precisely, I have to move the third person controller in quite close for it to work. 

I created a workaround, but it will require several machines and my environments to be large meshes. I created a second camera motor into first person and set it to a Trigger enter, then created a block behind my character which, when it hits the wall transitions to the other controller. 

Hopefully in time, this will work for me, but for now I guess I'll hand code it each time I create a mesh that requires collisions and camera changes.