How to make top down style game's camera fixed when I move into an area with roof?

Kehaw

Member
1715262611924.png

Hello, When my character move into an area has roof, the camera has changed the rotation, it's a good design, but sometimes I want to make the camera fixed, so how can I do for fix the camera?
 
Last edited:
If you set the top down view type collision radius to 0 then it won't detect the collider.
 
That is the correct object. Within TopDown.cs add this condition on line 282 so the collision test never occurs:

Code:
if (m_CollisionRadius > 0) {

You'll then need to close the brackets on line 317. You are basically just preventing Physics.SphereCast from running. I will also include this in the next update.
 
That is the correct object. Within TopDown.cs add this condition on line 282 so the collision test never occurs:

Code:
if (m_CollisionRadius > 0) {

You'll then need to close the brackets on line 317. You are basically just preventing Physics.SphereCast from running. I will also include this in the next update.
I'll test this case later. Thanks :).
 
That is the correct object. Within TopDown.cs add this condition on line 282 so the collision test never occurs:

Code:
if (m_CollisionRadius > 0) {

You'll then need to close the brackets on line 317. You are basically just preventing Physics.SphereCast from running. I will also include this in the next update.
Are you sure add that code on line 282?

1715411437389.png
Th line of 317 is this:

1715411483935.png

I have put the code on line 286 and close this condition on line 319, it works fine for me right now, like this:

1715411808046.png
 
Last edited:
Top