Tank Falling Through The Ground

Help I’ve tried setting the left and right track to OverlapAllDynamic and the ends of the tank are falling through the cube that is the floor. I’m also receiving a warning. Obviously, the wheels are not collecting correctly, but I can’t figure out where I went wrong. I renamed the MassWheelConstraint to MassAxelConstraint, is there other stuff that needs to be changed when doing that? Also, as I understand the wheel and the axel both need simulate physics right?

PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_0.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_0.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_1.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_1.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_2.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_2.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_3.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_3.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_4.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_4.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_5.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_5.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_6.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_6.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_7.Wheel) is set to simulate physics but Collision Enabled is incompatible
PIE: Warning: Invalid Simulate Options: Body (SprungWheel_BP_C_7.Wheel) is set to simulate physics but Collision Enabled is incompatible

Forgot to mention I am using 4.21.1.

I had to recreate the blueprint for the SprungWheel_BP and I may have forgotten a field.

Also no matter what I try the USphereComponent doesn’t show up as those red spheres.

Do I need to fill in the named constraints in the blueprint?

More info from debugging. During runtime the components of the sprungwheel are not nesting correctly. It looks like the following.


as opposed to:

Also this is what the sprung wheels are looking like.

I swapped out USphereComponents for the UStaticMeshComponent and the sprung wheel was nesting properly at runtime. This may be a bug with 4.21.x.

More details inbound: At runtime the Wheel and Axle are dropping through the floor and falling forever with an ever decreasing z-index value.

This is just turning into my debug journal. I was able to get more functionality out of calling:

Axle->RegisterComponent();
Wheel->RegisterComponent();

We now have springiness in the tank but it’s just floating up in the air now. When the tank is moved up and released or hit by ammunition it bounces on suspension.

24%20PM

For whatever reason the wheel is getting stuck at 0,0,0

What does everyone’s tank weigh? Is it 40,000.0 or 400,000.0

I was able to get the tank to rest on the wheel by itself, but when I swap out UStaticMeshComponent for the USphereComponent the tank falls through the ground.

Hey guys, I’ve spent quite some time to sort this issue out.
Basically, it is important to parent all your objects in the code, see the diff for this lecture here:

After you are sure all your code is correct, the important thing (the one which torture me for some time) is settings for all your components in the sprung wheel blueprint.
First if you do not see the Details for your wheel sphere component (or any other, really), delete your blueprint and create it again. It is annoying but it is way more annoying to spend time in order to try to make it work.
Next make sure your Wheel component Physics section is the same as in your Axle.
Then Axle Collision has to be set as
Custom;
Collision Enabled = Collision Enabled (Query and Physics);
Object Type = WorldStatic;
and Overlap for all the Collision Responses.

Wheel Collision has to be set to be PhysicsActor, this was the problem for me.
Check your constraints component and their settings, they should be setup accordingly as in lecture, you can see it in the video.

And in case after all this, you still have an issue, just download the project from the GitHub and compare your project with it (especially SprungWheel_BP setup). That what I ended up doing :slight_smile:

Good luck :yum:

5 Likes

I am sure this is a stupid question, but sometimes we forget the little tiny things. And I did this mistake myself, sooooo it would be good to say it:

Did you block the WorldStatic in collision preset?

1 Like

Thank you. This sprung wheel has been driving me crazy today. This was just the advice I needed.

Privacy & Terms