Writing to the Output Log
We are going to look at how to debug our games by writing the values of our variables to the output log.
In our MovingPlatform.cpp we are going to look at creating a log.
The first is the type of log, the cateory, and the text we are going to print out. When you run the message will appear for every actor in our scene that is a movingplatform.cpp
If we wanted to add in warning or error messages to our log it would look like this.
Now how about if we wanted to put data in the log instead? Say print out the move distance for a platform.
Now we talked about overshooting our movement before. Let’s see about logging our overshoot.
We now have a better way of monitoring our overshot distance by a significant overshoot.