Is there a way to temporarily disable rendering for a moment, just a frame or two?
For the whole game or just some actors? For some actors, it,s possible, for the whole game, why would you want to do that?
I think the solution of not rendering is not a good one. Teleporting your camera from 1 point to another should not produce the “intermediate” location issue you are describing, this is probably what you want to fix.
You can post the code here if you want further help.
For everything. The player is teleported between two locations that are identical (indoors) but some fraction of the time a frame is drawn which appears as a flash of an intermediate location.
Ideally, I’d like to have the screen not change during the teleport.
Hi pagancyc,
It looks like you are blending between cameras. Can you give some more information how to reproduce this issue? I am interesting in teleporting process (Is it respawn after death or just teleport?), how do you work with camera? In addition, what engine version are you using?
Best regards,
Hi ,
Sorry for the delay in responding, I was away for a bit. I very much appreciate you taking an interest in this. I just noticed this is way over the comment limit. I can email you a ‘working’ example and/or the sloppy (I will clean it up a bit) source code if that will help.
The teleport happens to the player while walking down a hallway that has doors at both ends. This happens in every hallway in the game, the player is constantly being moved between locations. The sources and destinations are all equal distances from the door they are closest to and when it works properly the teleport is invisible to the player. Here are the basics of how it works:
There is an invisible trigger box that the player enters while walking down the hallway.
The box’s OnComponentBeginOverlap calls a function named “TriggerEnter” which:
- Calculates the distance to the destination.
- Sets the character’s SetActorEnableCollision is to false.
- Calls the character’s ApplyWorldOffset function.
- Calls the character’s AddControllerYawInput since sometimes the character ends up facing the opposite direction.
4a) If the character’s direction has been reversed, its Velocity is set to the opposite of what it was initially.
The box’s OnComponentEndOverlap calls a function named “TriggerExit” which: - Sets the character’s SetActorEnableCollision to true.
When it works properly, it is totally seamless and invisible to the player that they have been moved. When there are issues, the player ends up in the correct location, but there are visual artifacts.
Details below…
NOTE: The character limit shown for this box is incorrect, it won’t accept the comment when close to but not over the limit.
When I first posted this question I thought that the view being flashed during the move was of a location between the source and destination. After Michael’s post I went back and did some additional testing, and what happens appears to depend on the orientation of the source/destination in X-Y space. There are twelve cases. Two work great, six the image appears to ‘bounce’, four there is a ‘flash’ of a wrong location.
All the rooms are above one another, centered on the X-Y (0,0) origin with a Z delta of 1000 units. The hallways radiate out from the center in six directions. Setting the positive Y axis as 0/360, the hallways head out towards 0/360, 60, 120, 180, 240, and 300. The teleporter is towards the far end of the hallway and the destination is at the near end.
Referring to the hallways by their direction from the origin:
-
From 0 to 180 and 180 to 0, the destination view sometimes seems to bounce or vibrate for an instant.
-
From 60 to 240 and 240 to 60 it works perfectly.
-
From 120 to 300 and back the view sometimes bounces/vibrates.
For the above six the player view direction and velocity do not change. -
From 60 to 60
-
From 120 to 120
-
From 240 to 240
-
From 300 to 300
The four cases above will sometimes flash a view of the player being closer to a door than they are. The player direction and velocity are reversed.
Possibly relevant: Each room and its adjacent hallways are their own level, and enclosed by a level streaming volume. The far end of each hallway is also enclosed by a level streaming volume assigned to the destination level.
As I mentioned above, I will be happy to get you a working example and/or the related source if that will help.
Thanks,
PaganCyc
Just realized you had asked about the version…
This has been happening for months, we put it aside to work on other things and just came back to it. We started on 4.2 and have moved to each new version as it came out, currently on 4.6. I am fairly certain is has been behaving the same way across all versions.
Will update to 4.7 next week and will be sure to let you know if that makes a difference.