-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering C++ Game Animation Programming
By :
We already have an action called Interaction, starting the interaction animation clip for the man’s model (and doing nothing visible for the woman’s model, as the model does not have an animation clip to show some kind of interaction).
This interaction action will be extended to send an event to a nearby instance, stating that we want to interact with the instance. A possible reaction to the interaction request could be the replay of the waving animation clip for the man’s model on the nearby instance, visually confirming that the event has been processed.
The renderer needs some variables and a bit of code to support interaction. We add these new variables in the OGLRenderData struct in the OGLRenderData.h in the opengl folder:
bool rdInteraction = false;
float rdInteractionMaxRange = 10.0f;
float rdInteractionMinRange = 1.5f;
float rdInteractionFOV = 45.0f;
...