Announcement

Collapse
No announcement yet.

[VR] Making HMD go black when the player look through a wall

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [VR] Making HMD go black when the player look through a wall

    Hello everyone!

    I'm fairly new to UE4, and I am trying to Make a simple mechanic on the HTC Vive: I want the screen to go black when the player try to look through a wall.

    To achieve this, as i understood that the Motion_controller_pawn was not exactly moving in the play area, I made a HMD_collision_box that follow the player camera position.

    ​​
    Click image for larger version

Name:	Collision box BP.png
Views:	68
Size:	90.3 KB
ID:	1355619

    The first problem is that the HMD_collision_box come back to its original position between each tick. Do you have any idea about how i can avoid that?

    Next, i used a trick to make the screen black: I made a second camera in the Motion_controller_pawn, with a black plane just in front of it.

    I created a Blackout_box which is just a collision box made to determine the forbidden areas.

    when the HMD_collision_Box overlap the Blackout_Box , the HMD view is switched to the second camera and the screen goes black.

    Click image for larger version

Name:	Overlap_BP.jpg
Views:	39
Size:	57.9 KB
ID:	1355618


    Well this doesn't even work, i did found earlier a dirty way to do that but it was also going black when the controllers overlaped the blackout_box, and i want the HMD only to trigger this.


    Do you have any idea?

    Thank you very much!

    #2
    I suggest post processing volumes. It is time consuming to setup on each object, but it works well and it's the best I can offer at this point.

    Comment

    Working...
    X