In this tutorial, you will learn how to use the point_viewcontrol entity to create a mini cutscene in your game. In this case, you will press a button, and the camera will zoom over to show a door opening. This tutorial assumes intermediate knowledge of Hammer.
Firstly, create a large basic room about. As usual, the actual size doesn’t matter, but mine is 704 units long, 512 units wide.
Create a “prop_door_rotating” entity at one end of the room, and set the “World Model” property to “models/props_c17/door01_left.mdl”.
The only flags that should be checked are:
Starts Locked”
Ignore Player+Use.
Name the door “Door”. Original, huh?
Create a brush at about eye level with the player on the wall.
Tie it (control+T) to a “func_button”. You don’t need to change any properties, but set the following outputs on the button:
My Output Named: OnPressed
Target Entites Named: Door
Via This Input: Unlock
Parameter Override: None
After a Delay in Seconds of: 0
Only Once: Yes
My Output Named: OnPressed
Target Entites Named: Door
Via This Input: Open
Parameter Override: None
After a Delay in Seconds of: 5 (So the camera has time to get there.)
Only Once: Yes
Next, create a “point_viewcontrol” entity next to your button.
Change the following properties:
Name: ViewControl
Entity to Look At: Door
Hold Time: 10
Path Corner: (Blank for now)
Initial Speed: 65 (You can change this to be faster or slower if you want.)
The only flags that should be checked are:
Freeze Player
Infinite Hold Time
Create a “path_track” entity next to the button. It doesn’t matter if it overlaps the “point_viewcontrol”.
Set the Name property to “Track1”. No other properties need to be changed.
Return to your “point_viewcontrol” and set the Path Corner property to “Track1”.
Create another “path_track” entity in front of your door. Set its Name property to “Track2”.
Return to “Track1” and change the following property:
Lastly, return to your "func_button" and add the following output:
My Output Named: OnPressed
Target Entities Named: ViewControl
Via This Input: Enable
Parameter Override: None
Only Once: Yes
You’re done!
A point_viewcontrol is excellent for opening sequences, such as the one seen in the Afraid of Monsters mod, (though it was for HL1.) It can be used to track moving entities as well, so theoretically you could make Machinima with a series of point_viewcontrol entities. Anyway, for questions or feedback, feel free to email (hambandito@gmail.com) or PM me.
-Psalm
yay, psalm is back, another nice tutorial
I have had a problem the camerea turn whilst moving please help
Well, you haven't really specified what the problem is...Email me what went wrong, and I'll try to help as best I can.
Hey,
This tutorials great, but the question I have is how do I return control back to the player once the cutscene is finished? When I press the button in the scene, everything works. But the camera stops on the last point, and it's stuck there. Thanks!
I had the same problem until I unchecked the Infinite Hold Time flag for the ViewControl.
Brilliant tutorial, this really helped me create Zelda-esque cut scenes for a level I'm working on.
Hey Psalm I was hoping that you knew maybe how I could take away the players movement but he could still move his head around