Virtual Reality – VR-UE4 – Create a custom role of Character

The materials I study are using the old version of ue4

There are many new versions that are different, and many things need to be explored by yourself,

For example, In the boss version, the default creation of a GameMode is sent back to the automatic creation of the constructor, but the new version does not have it, you need to fill in manually, and I don’t know the meaning of these parameters.


But these are not impressions, you can create your own

Declaration structure Function, and implemented in Cpp, we need to insert something here, that is, we need to add a new Character class in Unreal 4

The details are as follows

First file, select new c++ class

Choose to inherit Character and go to the next step

Enter the name of the custom class and click Create. After the new version is created, click Automatically open the compiler without confirmation

< p>The latest generated at this time, compile and debug

Add a sentence to the BeginPlay() function to verify that the game now uses our own custom Character


Compile, what we want to see should not appear at this time

We also need to set our own class in Gamemode

Add a line of code to the constructor of the Gamemode class. I will not copy the code here. I hope everyone can copy it by hand. You will thank me in the future, hahahaha

Okay, compile and run this time

The rest of the filling action and so on are being written.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1604 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.