So, this took me almost a day to figure out and this is horrifying me.
But I really REALLY hope this is a mistake on my side.
It seems like rotating a pawn will not update it’s collision properly. In fact, it looks like the collision mesh will rotate using it’s own pivot point instead of rotating in relation to the static mesh
Though, the Show COLLISION command shows that everything is correct…
Weird huh? Just take a look at that
In this example I have a stick that has a long collision mesh. If I rotate the mesh upside down, i can avoid the blocks just fine. Because the collision’s pivot is at the same place as the static mesh.
But if I move the Collision to the end of the stick and rotate my Pawn so it avoids the obstacles, it will collide nonetheless.
Fun facts : This happen if I rotate the pawn in-game and also if I do it in the editor !
And the last test, rotating the pawn so it hits something. Well, it doesn’t !!
So, did I messed up editing my collision mesh ? Am I missing some kind of settings to tweaK? I’m not using any third party tool, only UE.
I haven’t been able to reproduce this on my end, what collision settings are you using on your static mesh and on the boxes you have it colliding with?
4.6.1
I could upload the projet somewhere for you to check if you aren’t able to repro it on your side. But I don’t know much about file hosting websites.
Let’s recap my step to repro :
Make a staticmesh from a BSP shape (pivot point in the center)
Open the StaticMesh Editor
Click on “Add Box Simplified Collision”
Scale down a bit the newly created Collision box, then move it on the side of the StaticMesh
Create a new Pawn Blueprint then add a StaticMesh component using the one created (Should be the Root)
In the event graph add an Event Tick that fires an Add Actor World Offset (Delta Location : X:-2 Y:0 Z:0), so the pawn start moving when spawned. Check “Sweep” so the function detect collisions when moving
Now place the BP in the world and make sure there is an obstacle in the trajectory of the Collision Box (the one created in step3) of the Pawn
Test. It should collide as expected
Now in the editor, rotate your pawn so the Collision Box would not collide with the Obstacles when moving.
This does appear to be an engine bug, I have a fix for 4.8 that is being reviewed by some other engineers. Thanks for the test project, it helped track things down!
Hi, I think I experience the bug mentioned here and now I’m not sure if it’s a new one or if the fix is just not in 4.9? It’s not a huge problem, if it’s fixed in 4.10 then everything is fine So my question is just whether this should be fixed in 4.9.2 or not.
Hi everybody! we have the same bug in 4.22, we have a camera rotating around an object, we want the camera to clllide with object in order to not make it go through them, how could we solve this problem?
I don’t think this is fixed in 4.22 and ever will to be honest.
The solution I applied, to workaround that technical limitation, was to calculate the destination location, operate a translation, detect if there are collision, then apply rotation.