Sphere collision produces inconsistent results based on input
I'm trying to replicate Cities:Skylines camera controls and behavior. Here is my actor setup:
"CameraPawn" profile was made by me and it only blocks WorldStatic and does nothing else. Then I wrote the following code inside Tick:
This properly prevented the actor from going through simple flat landscape. However, in C:S you can also zoom using the mouse wheel and I tried to replicate the same thing:
This works as expected with exception of that it passes though the landscape. I've tried many things - enabling sweeping, ccd, collision thickness on landscape, batching AddActorWorldOffset calls together - nothing helps. The physics engine seems to completely ignore second approach to modifying position.
Also the steps aren't even big enough to just "jump" through the landscape - it is possible to stop at a point where the sphere is half above, half below/inside the landscape and the engine still doesn't attempt to force it away. Also this problem appears only when moving directly down - "zooming" at angle properly triggers blocking collision. Also sometimes colliding with landscape by zooming causes the actor to endlessly fly upwards...
I'm completely lost - any suggestions are welcome
P.S. I've omitted most of actor code for sake of question brevity but I'm sure that it works correctly. I can post it if it's needed
Follow this question
Once you sign in you will be able to subscribe for any updates here