After following through lecture 192. Using Forward Declarations My tanks completely disappeared. It compiles but it shows those errors
just in case someone needs to see the source this is my page
Covered in the next video. The function is now taking a UTankBarrel
and what you currently have in BP is a UStaticMeshComponent
still.
oh nice! okay I will keep on pushing through without me watching the next lecture yet my guesses are instead of having a static mesh barrel connected to Barrel to Set, I will have to connect the TankBarrel class that was created that wasn’t implemented yet to this Barrel to Set?
Well it is implemented just not added in the blueprint yet. And it requires the UTankBarrel class being BlueptintSpawnable, hence the title of the next lecture.
Thank you for clarifying that. I was so stuck in the thought of trying to make sure the current iteration works before heading to the next lecture. But now my tanks are back sorry for being a noobie
Although do you know if there is a reason why everytime I compile in UE now with the new TankBarrel I always need to re-set the static mesh to the tank barrel and reparent the socket? its not hard to put it back but I could see this as bothersome in the future
That’s actually a bug in Unreal. Compiling the source will un-set some references in Blueprints. It does get really old really fast, and if I remember correctly, there’s a fix in the udemy discussions, involving binding the mesh in the blueprint’s begin play event…
that kinda worked but for some reason that made the mesh of the whole tank shaky and then it took off flying off the map like it was kicked lol I turned off the connection from the construction script for now. I was just wondering is there a difference between the contruction script and BeginPlay() in the event graph?
That’s a collision thing. The barrel is colliding with the tank, which is causing the tank to try to move out of the barrel’s way, which it obviously can’t do. I think Ben has the same issue in a few lectures, and solves it by just setting the barrel (and turret, and treads) to ignore all collision, so the only thing that collides is the body of the tank itself.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.