Actor glitching after camera change

Hi Guys,

I’ve got a strange issue occurring: the game starts and a Sphere drops to the floor in front of a camera actor and settles. Then, on a button press, the camera changes from the first Camera Actor to one attached to a Third Person Character. The second the camera swap happens the Sphere appears to glitch out and crazily flies around the level before disappearing from view. The most annoying thing about this is that I’m only able to reproduce it maybe 2-3 times out of 5 attempts.

As far as the Sphere goes, it’s a standard one from the Basic panel with a Sphere Collider attached. It has a bit of scripting in the Blueprint to reset the position every time it passes through a couple of specific trigger volumes (the start position of the Sphere is not near either of these).

Any help or suggestions would be appreciated.

I’ve tried to look into this further by myself - apparently there are potential problems cause by having too small an actor - however this doesn’t appear to be the case for this problem, as I scaled the actor in question up by about 10 times it’s original size and I’m still seeing it fly off when the camera changes.

I was thinking this might be the issue but I can’t see this happening anywhere. The only time I move the actor in question is when it passes through one of two trigger volumes, and it’s not near these when the camera changes. The actor also flies off like it’s been given some massive, random velocity.

Thanks for the info, I’ll have a go with this and get back with my results.

So I’ve done as you suggested; I’ve created a new channel that only watches for WorldStatic objects and blocks them, it ignores everything else. This seems to have completely fixed things.

I’m not totally sure how to use this information, though. There must be some kind of collision it’s reacting to. I guess I’ll just have to go through checking off options until I find what the problem collision type is.

This is a wild guess but it could have to do with physics culling, as you swap camera the engine might see that as the object no longer being in the viewport and, (depending on your optimization settings), either turning of physics or skipping a couple of updates in order to save some performance - this possibly could possibly cause errors if it happens on the wrong update.

I haven’t dived into this to much in ue4 yet, but Iw seen similar situations in other, (older), engines so it could be something to look into.

For anyone else having this issue, 's solution fixed it. I basically ended up creating a new collision channel specifically for blocking WorldStatic objects and ignoring all others, then from there I turned on more Object Responses until I found the Object Response that appeared to be causing the issue. In my case I’m guessing it was either the Camera or the Pawn responses that were causing the problem.

are you maybe moving or teleporting actual actors with collisions in the process?

an easy way to find out would be to enable collision ONLY with the floor that the sphere is goin to hit. That is doable by setting a specific custom collision channel for the floor and then set the collision responses for the sphere only for that type of custom collision

to add new collision channels go into project settings

glad it helped =)