All three points are just easier to implement using custom component. The solution is rather simple, use physics constraint to establish limits of the movement - for example spring can compress not more than 15cm and expand not more than 30cm, which is just a limit of 15cm on linear constraint with some offset of pivot if necessary. Then spring and dampener forces are added using custom component where scaling can be done properly and you can handle how and where forces should be applied, what their scale should be and etc. First two points are implemented for suspension on Aerosled RF-8 example already. Proper scaling is still missing and handling of other objects being properly pushed by skii.
That’s true, it is easier if you customize. The only concern, and that’s definitely only of ‘philosophical’ nature leading to discussions with no end in sight, is the reliability side of custom solution. Opening the ‘source code can’ is something we for example always shied away from, because while on simple tests scenes such custom made implementation might be working, there is no guarantee really that it will still work alright in a full game were cpu load is heavy and certain timer budgets might get violated and so on and so on. Basically there is the ever lurking danger that if you customized, then at some other end later on it might backfire and you might not notice it for months before it hits. Essentially, looking how even Epic breaks features on a somewhat regular basis with their own updates (like two side foliage in 4.11), which is kind of normal looking at the complexity of the code base, it might be a good idea to have the Epic phyiscs programmer have a quick look and give his Urbi et Orbi at the custom made solution before entering a larger project with that solution. But yeah, that’s just endless paranoia of which you can not have enough really
I tried to migrate the entire MMT project to another project… but that does not work.
Can I migrate it to another project?
I just opened it and did a migrate > the root folder to the content folder of another project.
But when I now open a blueprint in the other project I get an error message .
"Blueprint could not be loaded because it derives from invalid class.
Check to make sure the parent class for this blueprint hasn’t been removed! "
EDIT : Wait never mind! I forgot to also copy the plugin folder … works now
Wait,
I do have something weird…
the physics seem to go all over the place…
When I for example place the T26 in the map and play… it starts flying all over the place.
Most likely collision bodies are intersecting. I have a couple of custom collision channels for chassis/suspension/wheels. Check them in MMT_Content under ProjectSettings->Physics. Add the same into your own project and migrate it again.
Another thing to check is if Physics Sub-stepping is switched on in Project settings.
Indeed I did not have substepping turned on, but after enabling that I get the same result.
The M113 and Ripsaw work fine, but the lighttank and aerosled somehow seem to start floating as if there is no gravity in the scene (if I have to somehow describe it)
One other question… where did you define the Camera horizontal and vertical controls?
I see most input defined in A_TrackedVehicle blueprint and added them all to my project axis and event inputs… but I don’t see where you added the camera inputs.
It’s a collision issue - like wheels are penetrating suspension and chassis, you need to add custom collision channels, check my previous post. I might append them with a prefix in MMT_Content to avoid name clash if you already have custom channels.
Controls for camera are set in MMT_Controller(PlayerController) as far as I remember, I’m using the simplest “orbit camera” setup where controller rotation is used for pawn’s camera. Controller class should be in root folder of “Blueprints”.
ah yes… I see it now I was in the wrong tab… was looking in the physics tab in the project settings… but had to look in the collision tab to add custom collision channels…
doh… sometimes I feel so dumb
Ohh, sorry for that, I was just writing from memory. Yes, if there is a different tab for collision then it should be there.
Small update
I have a trial of Modo right now and before it expires trying to learn it as much as I have time for it. So far got model of the “conceptual” gearbox, almost done:
Need to rig it and import into UE4 where I’m planning to animate it using AnimBP. Model has a nice proportion of gear tooth, which gives gear ratios of 5/4/3/2/1 which is usable and can be accurately animated.
In other news, 0lento pointed me to a fix for reading proper physics materials on contact with landscape. I’ve tried it and it works, this is a great news as I can finally add a rolling resistance and different particle effects for driving over rocks/sand/soil/asphalt and etc.
Rolling resistance is very important phenomena for tanks or any off-road vehicles as it directly effects their performance and handling. In case of tracked vehicles it’s one of the major forces that limits vehicle top speed. Still need to finalize math for it and prepare some demo setup.
wow… looking really nice
You cannot go wrong with modo… I’ve been a Maya User since version 1.0 but 2 years ago stepped over to Modo… best investment I ever did… Modo is now my weapon of choice when it comes to modeling.
Great news on the landscape contact since I seem to have a problem with that.
I migrated the entire MM toolkit to a testscene with a landscape only… and the only thing I have trouble with is the T26.
The M113 and ripsaw work fine on a landscape, but the t26 does some very weird things…
Added all the custom collision channels and fixed it in the Blueprint… the weird floating is gone… but the wheels act really strange on a landscape.
Can you record it? I could take a look into project if you want, maybe can spot something.
I will record it for you…
[video]- YouTube
Here you go, hope you are able to see it.
The suspension goes all wonkey… twists… see tracks
I fixed all the collision channels… and double checked with your original scene.
have not been able to fix the camera controls weird enough… so I just rotate the tank sideways so you can see what the suspension and tracks are doing.
Hmm, looks like bogies are rotated by some weird angle. Could you try to re-migrate just T-26? Otherwise you need to check if there is any weird angle on bogies or physics constraints that hold them in place, maybe constraint axis is wrong, that would explain why they all turned in the same direction.
there is nothing wrong with the lighttank blueprint… all bogies and constraint have the right angle.
If I open your map inside my project it works fine.
It’s not related to the terrain… because when I create a ground plane in the scene and put the t26 on that… I get the same results.
But no problem… I don’t need the T26 for now… I just noticed and tried to fix it.
Not sure what you mean - " when I create a ground plane in the scene and put the t26 on that… I get the same results." you get the same bug or you don’t get any bug? Honestly I don’t understand why would it depend on map at all. Have you renamed some components inside?
Just like I said… in the map I created a large flat ground with a box… and placed the T26 on it… so it would not be on the terrain but on the box… but same bug with what I showed you in the video.
And no… like I said… I did not change anything in the blueprint itself… and that same blueprint works fine when I open your testmap in the same project… does noet make sense… maybe I missed a global setting somewhere.
I don’t need the T26 blueprint right now, so I’m fine with it… but if you like me to dig deeper.
The only reasonable explanation I have as to why suspension would look like that is physics constraints being turned by a different axis. It’s fine I’ll do some testing on my side, will copy it into a new project and see what is missing.
Hey there,
I really enjoyed to read the discussions here (as a math graduate) and i am currently trying to make myself familiar with the unreal engine. You guys keep my attention high, thank you very much for that.
As a silly question; I watched OldRaven’s tutorials. Now i want to try it myself with a different tank model. However in my free time i created a simple airport scene (way to far to be finished tho) and i want to use that scene (vehicle blueprint template - 4.11.1). Is there a way for me to use this plugin in that project? Copying the plugin folder didnt do the trick.
Thanks in advance