Hi there,
First of all, I’m very new to C++. I’m trying to set a bool to true from an Actor in an ActorComponent, but when I run the game, it throws me an error that I can’t figure out. I’m almost pretty sure that the problem is lying in the casting, but still… please, help!
Here is the relevant code from the Actor.h:
And the Actor.cpp:
What I’m trying to do in the ActorComponent.h:
And in the ActorComponent.cpp:
Basically, in my game there is a turret (the Actor) that rotates if that bool is true. I have another Actor (which has the ActorComponent) that the player can interact with to turn the rotation on.
Also, the error that I’m getting (basically, the Editor crashes)
The error referencing the { in the Actor.cpp
Please, help me. I would like to learn from my mistake. Thanks!