We’re going for the architecture that will teach the most general tools, and provide an interesting challenge - at least that’s my intention
Well couldn’t you use the AddForceAtLocation to something like speed/slow tracks within the level to push/slow down a tank. Whilst having more arcade like controls? Unless you planned on doing suspension also, but wouldn’t that require cutting the wheels from the body mesh?
uhm…sorry to ask: but have you seen the fly-by-wire lesson yet?
The tank gets a normal “arcade” steering as a control-layer, which translates to the track-physics.
The struggle I was having today was nothing really to do with the control system.
What I’m trying to achieve is a very well separated component system, where for example we don’t have to pass references to barrels and turrets down from the tank to the tank aiming component, and likewise for the tank movement components.
@sampattuzzi and I have worked it out now, and it makes the whole process of adding new components to the tank such as the movement and aiming components much easier. It also makes the public interface to the tank and all of the other classes much cleaner, which is very important as the project gets larger.
One reason for the previous confusion was that we were composing actors in two places. Firstly there is the composition in the blueprint, and then we are adding default subjects in C++. Whilst this is a noble exercise and can be useful in some instances, in this instance it is making my life more complicated. I have now found a better way that is 95% perfect, and about as good as possible with Unreal I believe.
I look forward to sharing it with you all tomorrow
Yes I have. But that doesn’t change my opinion that creating your own physics based vehicle system seems like it would be out of the scope this course. Having a tank that has wheels and then deriving from AWheeledVehicle seems like it would be better suited for the course.
My feedback regarding lecture 150 is the same as a previous one I gave on Udemy to do checking for nullptr on functions designed to initialise values, and realised I never got a reply.
The “pointer protection” you added to the end of the video is entirely pointless as it’s most likely not “protecting” anything as they are initialised to nullptr so if nullptr is coming into the function nothing changes and code somewhere else still might call their functions. The only case that it would protect from is if for whatever reason you were to call that function again with a nullptr after you initially set it up correctly. I think an assertion would have been better as it must be called with something valid.
Edit: Lecture 136, you could have enabled the tracing of the SuggestProjectileVelocity instead of relying entirely on guess work too see reasonable launch speeds.
Thanks @dan , sorry your previous comment got lost. I will add this to my queue of tweaks to the code, thanks
Hope you guys enjoyed the early pathfinding videos?
I had to invest a lot of time today on support, planning and preparing to link all Udemy lectures to forum tags.
I can’t wait to climb back into the BattleTank tomorrow.
Just wondering, when you get back to tank controls, are you going to be doing line tracing to project the force on the ground rather than the location of the tracks so you don’t just go flying? Not really familiar with vector maths so not really sure how you would calculate that based off the normal.
Yes, we’ll be doing that, as well as ensuring the forces are only applied when the tank is actually on the ground, and applying a sideways force to prevent skidding. There will be more dot and cross products coming than you can shake a stick at, so your vector maths will get a boost
Cool thanks.
You’re welcome Dan, and thanks for all your feedback and patience.
10 new quiz questions live now, and a FVector::DotProduct()
video just uploading. Cross products and full AI tank movement after lunch
Thanks Dan, fixed.
And other one uploading, that’s 3 today. The movement component is done and dusted
It’s most likely too late now but I feel like it would have been better, structure wise, to have the Tank’s controls setup so you’re just setting location/rotation initially, move onto AI and get that working, then showcase a problem of not doing movement via physics and then focusing on switching to that.
Thanks Dan, it’s just a lot of extra work that way as you have to setup blackboards and more which we’ll cover in a future section, building it up.
How did you find the vector maths bits?