Question about UE4's "gravity".

You could add like 50 to the Z vector and set world location everytime you pressed a certain key, and when you did the object appears up in the air. Why does the object just sit there in the air? Why does it not fall down just like the player character does? Enable gravity is selected in the pawn BP for the object. Anyone know why? Thanks

Hey @usa423
you have to enable SimulatePhysics.

Ok, but it still isn’t working.

Could you please show/share what you currently have in your blueprint and explain what you want to do.

What kind of object do you have?
Do you need to have a pawn? Could you use a character?

Hey @usa423!

I agree with @L1z4rD89, we need more information in order to see what is happening. To add on a bit more. What do your collisions look like? What are the settings for the object upon instantiation?

1 Like

Hey @L1z4rD89 and @Quetzalcodename I have started another thread where I posted some code of how I made the gravity.

Hey @usa423,

Looks like your fighter is falling but that doesn’t explain why it would float. Specifically when you enable show collisions and when you change the view to player collision, what do those two settings look like? Your object is more than likely floating due to the way your collision is set up or the way you set up the collision box underneath the fighter that you use to get into the ship. By seeing the player/world collision, it will narrow down what the issue is.

zhf9EOmO3k


I ticked those but all it seem to do was make the landscape look like a reverse negative kind of effect on the preview.

Hey @usa423,

Your landscape isn’t the focus we want to look at in your scene, it’s your fighter, for example take the chairs and table provided in the started content:

Additionally, we do still want to look at your blueprint viewport to ensure there is no volume or anything else preventing your fighter from falling all the way down:

Hopefully that makes clearer what we need to see.

Ok here is the thing, once I changed the viewport to collision, I am having trouble locating the fighter on the map.

But I made screenshots for all the collisions on the fighter. As far as I know its just default stuff. There is a static mesh and two box collisions for entering and exiting the vehicle.

Hey @usa423,

Ideally you should already be looking at your fighter in your viewport before changing your viewmode to player collision. However, if for some reason that is an impossibility, you can look at your collision by opening the static mesh (as you will not be shown the collision bounds inside of the blueprint).

This is also where I would suggest changing your collision to complex to see if that corrects the issue, I do still suggest looking at your fighter in your scene though:

Your collision boxes are not below the mesh, so that shouldn’t be causing the issue.

Hey @usa423,

Checking in. Was the above the solution you needed? Are you still having this problem?

Here you go.

It is a complex collision and the two box collisions for enter and exit.

I just disabled my artifical gravity to the fighter, pulled the fighter 50 or so feet off the map surface, started the game, and it is still not falling. Everything has gravity ticked, the mesh, and the two boxes.

Hey @usa423,

If you are no longer using your custom material, you will have to use simple as complex to simulate gravity and simulate your gravity in your blueprint.

However, you will not be able to walk under it most likely. The solution that I suggest would instead to be to create a skeletal mesh for your fighter and re-import it so you can have a custom physics asset that will get you exactly what you are looking for.

1 Like

The Empire is not really well known for their physically accurate simulations. I’d stay away from pure physics sim for a Tie Fighter. Try this for the most basic controls:

image

Gravity can be applied in a similar fashion:

To make it work better, tie (ehm) it to acceleration or velocity. Ignore it when you go fast, increase it when you go slow. Or keep it off while airborne and enable only when ready for a vtol.


I’d also stay away from Set Actor Location - this would force geometry penetration.

1 Like

Ok thanks for the suggestions!

Big thanks Everynone! I did not know that floating pawn component even existed (and I have fooled with this engine off and on for years lol) Yeah this is cool, and really simple. You have done with 10 nodes what I couldn’t with dozens lol. Can I buy you a beer?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.