I have a “tank” pawn (tank right now is just a box with four wheels). When I play my level it spawns above the ground and falls incredibly slow, also when it hits bumps in the road is can stand up on the front or back wheels and it takes a very long time to fall back to the ground. I believe the problem comes from gravity not affecting it correctly. I can’t change the projects default gravity because all other objects fall at the correct speed. Is there any way to increase the gravity just affecting the pawn.
You could adjust the mass scale under physics tab in the details panel. That should change the rate of how gravity affects the object compared to the rest of the world
Is there any way to increase the gravity just affecting the pawn.
There is! It’s done like this (First, go into the blueprint for the object):
As Iorgus have said, you can simulate physics and increase the Mass in kg, or you can just increase the Mass scale, like here:
ok, but it is weird, try to upgrade your project to 4.10 or 4.11, maybe it is a bug in the project.
happens sametimes
I tried messing with the mass and mass scale, but there was no change, which makes me think gravity may not have been the issue. I did implement a quick fix just to get me running: in the event graph on event tick I set linear velocity (only in the z direction) to constantly be -20. This works well enough for what I am doing. Thanks for the ideas.
Selecting the static mesh of the tank, under the physics tab, did you make sure to tick both “Enable Gravity” and “Simulate Physics”?
If all else fails, you could simulate the gravity yourself. Seeing you have already written a blueprint you could try:
Adding an acceleration variable g, and each tick setting the z velocity to: g x DeltaTime x GetVelocity.Z + GetActorVelocity
I do have physics and gravity checked, but originally that didn’t work. I kept the boxes checked, but also enabled both in the event blueprint. Now gravity does effect it, but not effectively.
Good, now the only thing left to do is to adjust the mass in the blueprint where you ticked the boxes as mentioned. Does that give you the desired effect? If not, please tell me, what is “not effectively”? Not strong enough?
Wondering that too, if it is not strong enough, he could increase the gravity scale too
Univise, thank you. I had kept changing the mass and mass scale in the details panel and it had no effect. I hadn’t thought about changing it in the event graph. I set mass and mass scale at begin play and it seems to work fine now.