Member Functions

Chris Didier
2 min readNov 14, 2022


We are going to be creating our own class member functions. They will be MovePlatform and RotatePlatform.

We have yet to create our own functions, but we have been using the built in functions so far.

First, we need to head over to the header file and create a private category below Tick. We will create to private voids. One is MovePlatform looking for a float and RotatePlatform also looking for a float variable of deltatime.

Now let’s head back over into the cpp file. Now we have to call create our functions in the cpp. Since we are creating them in the MovingPlatform we must say it is a function in AMovingPlatform:: Function(arg){}

We moved the movement code from Tick to inside MovePlatform and in Rotate platform we are getting the name printed to the log of the item that is rotating.

Here we can see that in the Tick() function these functions are called.

Now we can cleanup our code and make it easier to read for all.