![]() ![]() Now that we have our custom PlayerController and GameMode Blueprints completed, we just need to tell our World Settings to use them.Ĭlick the Settings button located in the toolbar. You should see the Mouse_PlayerController class created previously. In the Classes category, click on the dropdown next to Player Controller Class. In the Pick Parent Class window, use the Search bar to find the GameMode class and click on it. Note that the steps described here will not work if you have not yet created the custom Player Controller class as described above. Now that we have a PlayerController that has Mouse Input enabled, our next step is to create a custom GameMode that utilizes our new PlayerController. This will likely include Show Mouse Cursor, Enable Click Events, and possibly Enable Mouse Over Events. In the Mouse Interface category, check all the options that apply to your project. This will open up the Class Defaults window. Right-click on your new Blueprint in the Content Browser and choose Edit. Name your new class Mouse_PlayerController. In the Pick Parent Class window, use the Search bar to find the PlayerController class and click on it. In the Content Browser (for sake of ease, use your Developer folder), right-click and choose Blueprint Class from the context menu. In most cases, there will be others steps involved to customize your PlayerController and GameMode for the specific type of game that you are creating. Through the following steps, we will walk you through the creation of a custom PlayerController Blueprint Class that will allow you access to the mouse cursor.īe aware that these are just the basic steps for enabling mouse control. This is because not all games require a mouse cursor as their main form of interaction. Use Blueprint scripting (either within the Level Blueprint or any Actor Blueprints) to process mouse interaction.īy default, the PlayerController class does not have mouse interfacing enabled. Set the World Settings to use your new GameMode in the Default GameType. We will cover them in greater detail below:Ĭreate a new PlayerController Blueprint Class that enables the mouse cursor and any other desired mouse behavior.Ĭreate a new GameMode Blueprint Class that utilizes your new PlayerController Class. At a high level, the steps in Blueprint are as follows. To make a game where you use the mouse cursor possible, there are a few things you must do when getting started. Setting World Info Properties for Your Custom Game Mode Creating a Custom Player Controller for Mouse Control ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |