Hello everyone!
I’ve been doing fine in the course so far, but I’m stuck on several game breaking bugs that neither google or the API documentation have been able to help me with. Here’s my repo: https://github.com/brno32/04_BattleTank/tree/master/BattleTank/Source/BattleTank
Here are my issues:
- SetRootComponent() in Projectile.cpp doesn’t always work. It says I cannot pass a UStaticMeshComponent in; sometimes it compiles, sometimes it doesn’t.
- In Projectile.cpp, ExplosionForce seems to be behaving as a nullptr. As you can see I’ve protected it, but since it isn’t getting set, all of the code afterwards won’t work of course, and I cannot for the life of me see why.
- ExplosionForce inside of my blueprint has no details panel. Removing the component, recompiling, putting it back, and recompiling it fixes it until I run the game again. Is this related to the issue with the pointer having trouble being set?
As you can see my code is almost identical to Ben’s, so I’m confused as to why it doesn’t work. Surely it’s not just the fact I’m on 4.17? And btw, I cannot find SetRootComponent() mentioned anywhere in the documentation. If anyone could point me to it, that’d be great!
@DanM, I’ve seen you posting a lot and your comments are always helpful. If you have the time, I’d appreciate you pointing out whatever dumb mistake I’m making!