[OPEN-SOURCE] Machinery Modelling Toolkit

This is my current tank setup. But what i did was i apply the force directly to the tracks cpp component. And i think this setup will make life difficult for me as i planned to give suspension system and track animation too. So i need to change how things work a bit. And talking about engine curves, where did you get your reference from?

Lol spending much time thinking about these two float values.

This is also my goal. If you have some reference for Challenger 2, M1A2, Merkava and T-90 i would love to know. Next i’m planning to dig at how you tackle suspension system at your work. I hope i can understand them.

Unfortunately I don’t have reference for them but what you can do is find name of the Engine from Wikipedia and then search for technical manual of that engine. Technical manuals normally include torque curve.

Cheers. Thanks a lot for all your response.

Hi,on forum message notifications don’t work ,I send you PM so if you can look at, and help me with this
Thx

I tried making a wheeled vehicle based on the toolkit and i have had some joy with it. I am calculating the friction of the wheels in their front and side directions with more side the forward friction and then turning the front wheels to make the car turn.

There is a couple of issues i am running into though. One issue i have is that when i turn to go around a corner the car will accelerate by about 5-10% of its speed. This means in some situation the car goes uncontrollably fast whilst turning. I have no idea what would cause this any help would be good.

The other issue i have been having is that one of the car models i have made has thin wheels. This means when i make the sphere trace for the wheel there is a massive sphere sticking out the side of the car meaning if i get close to a wall then the edge of the sphere will go up it and flip the car. Is there a way that i can use a custom shape for the trace? If not do you now some logic that could filter out collisions that are more than say half wheel thickness from the origin point,

First part sounds like some energy is created. When you model lateral and longitudinal friction, do you use friction circle to derive “true” friction coefficient? Can you tell me more which components you use from MMT or you are using only pawn for sub-stepping.

For more accurate wheel collision take a look at 4WheeldVehicle example in the main level. It uses new suspension components which support custom shapes for traces. Friction components on that vehicle have coefficient setup in similar way to what you describe but in my opinion this is not enough for proper tire simulation.

I have tried using the suspension stacks used in the 4WheeledVehicle and i have been experiencing some strange behaviours. I recorded this video to demonstrate. As you can see there is a strange vibration when driving around and the wheels appear to go through the floor at times when there is a high speed impact.

Attached are images for my suspension stack setup, suspension settings, mmt physics tick and wireframe for collision mesh.

Tick Update on Wheel - what does it do? As in are you sure you want to call it on each sub-step and before the physics update of suspension?
Visual wheels can lag behind the physics, to avoid this you have to move the up/down in local space, especially if you are using skeletal mesh for the vehicle.

what the tick update does is reset some variables to 0 and gets values for some for my movement and friction functions.

For the wheels i am getting the wheel hub position and setting the relative location of the wheel to that location.

Ok, so it doesn’t deal with animation.
One thing to try is setting your actor to pre-physics update. I had the same problem with tanks and vehicle, but don’t remember what made it work at the end. Need to look at the code.

The actor is already set to pre-physics. I have tried the other tick groups and i have noticed no difference. Suspension still has the virbration and wheels still clip through things

Do you see a visual lag of the wheels when you drive around?
vibration can be indicating that suspension force is too strong. Try setting half of what you have now and raising maximum ratio - so it doesn’t scrap ground in turns.
The idea is that suspension’s spring stiffness parameter is the amount of force that is needed to hold a vehicle at maximum suspension length, which is suspension top offset - suspension bottom offset), basically a distance between two offsets. Spring maximum output ratio is the maximum alllowed amount of force produced by the spring at maximum compression (minimal suspension length).
its easy to calculate spring stiffness parameter. Take weight of your vehicle, multiply by 980 (default acceleration from gravity) and divide by amount of suspension components that you have.
spring force ratio should be around 2.0 - meaning that if your 4 wheeler vehicle is riding on just two wheels for some reason, suspension still can produce enough force to keep it off the ground.@ ^

@ ^ I’ve edited post with some extra details. I don’t see wheels lagging on video, but vibration is most likely because of too much suspension force.

it appears that the wheels only go through the ground when at compression. would the output need tuning for this.

Also would adding physical collisions for the mesh at compression to give a physical collision be a good idea?

Was just thinking about this - yes just add small spheres or extra geometry into your collision mesh, so at maximum compression chassis will collide with ground. And yes, higher ratio helps too, but if value is too large vehicle might behave unnatural, like jump into air. With ratio of 2.0, if vehicle drops in all four wheels from the height, it will bounce into air as total spring force will be two times higher than gravity pull.
have you tried adjusting spring - wonder if that helped with removing vibration.

yes i fixed the virbration. just the collision issue now

I have added the collisions and recorded me driving around with pxvis collision enabled.
As you can see the collisions don’t seem to fix the problem and there is a lag of the collisions (this might just be the overlay)

Does it rest on additional collision if you disable wheels? Cause I can see how those wheel colliders are going through the ground. If you vehicle is not a skeletal mesh then you can add just 4 small capsule components, don’t simulate physics on them and they will be welded to their part as part of it’s own collision.
Collision shouldn’t be lagging, how did you add those colliders?

i added the colliders in the blueprints as a static mesh that is the child of the suspension stack

Make it a child of your root component / static mesh (which simulates physics) then they will be welded to it. Then they won’t lag and will become part of the collision of the parent as long as collision preset matches.
Suspension Stack is based on scene component and collision won’t pass up the chain because of this. So if you want components to be welded on physics level, they have to be connected directly in hierarchy - you can’t have scene component in-between.