I have been playing around with inputs and causing them to move objects. One thing stumped me, for example, it took me a while to figure out that to get an object like a sphere to jump up a little bit, I had to add a Force of 5,000,000 to get it to move a little. Is there a reason for this, or is there something wrong with my setup? Thanks.
Have to see the set up but big numbers applied to physics based solutions usually indicates a relative scaling problem. A force of 5,000,000 might be needed to move an object the size of a planet when it’s suppose to be the size of a beach ball. It could also mean that your fighting one force against another. Gravity for example set to -100,000 you would need very large numbers to move anything at all. Also might want to check mass.
Keep in mind that forces should be applied over a duration of time. If you’re applying a force for a single frame you will likely not get the intended effect (in this case you’d be better off using an impulse).
Momentum = mass * velocity
change in momentum = force * time
Since mass is constant, change in velocity = force * time.
As you can see if time is very small force will need to be very large.
As FrankieV pointed out, it may also be an issue of scale.
Well, the object I was using was the default sphere that shows up in any new project, the mass I believe which is just 1. Thats why I thought it was strange to have to put so much force to get it up.
Well in computer terms 1 can be a very big number as a reference to mass.
Google check an empty balloon has a mass of .012 kg.
Assuming that a physics base result is required then all elements as to the math has to match the real world equivalent.
Or
You can cheat and give the object in question a positivity gravitation value.
And as a though. You did tell UE4 that the object was a movable right?
yes of course haha, thats always the first thing I check!!! Ok here is something interesting, maybe you guys can help me out. When I looked at the component part of my pawn, yes I noticed now that the Mass in KG is 109kg. However it is greyed out so I can’t change it, and it says “because this is computed, it cannot be set directly. See mass scale to modify the mass value.” So when I type in the filter , I find “Mass Scale” and it is equal to 1. So my question is, why did unreal set the mass on its own to 109 kg, and what would I do to the Mass scale to make it make things more realistic? Sorry for all the questions guys, I’m still learning so much everyday!!!
Ok, so playing around, I see that if I use “Set Physics Linear Velocity” that it takes a much smaller value to push an object than “Add Force” does, so I suppose they just work on very different scales?!
The mass is computed based upon the model bounding box itself. So the larger the box the more mass it will have. The Mass Scale scaled it up and down. A value of 2 would be 2x the mass of value 1. So if you set it at like 0.5 it would be half the amount of mass.
Also if you are trying to make a object hover in the air then you are going to need your gravity setting to be much lower then what it defaults to. This will allow you to apply less force upward.
Thanks for the info Toom. But it does not seem to be a logical way to determine mass. I mean, a bucket full of tissues is way heavier than a bucket full of water, etc…I don’t understand why the user can’t just set the mass himself!!! Everything else so is so customizable, and yet something simple like this isn’t. lol, Unreal programmers you confuse me! Love you guys though!
Well the question here, sorry to say I don’t have the answer, is does UE4 use a true physics engine or are they just breaking the values out so someone can add their own physics engine?
There are a lot of physics based middle wear solutions so to me it makes more sense to have access to a variable that creates an action than it would be to expect everyone to use Epic’s physics solution.
UE4 uses PhysX under the hood. It’s written in such a way that you could if you wanted to replace PhysX with whatever else (Bullet, Newton Dynamics etc) but it would be a bunch of work and you would be responsible for keeping your own fork up to date as new patches come out, which if you’ve rewritten something as core as physics integration may mean a lot of work to keep up to date with the rest of the engine.
The version of PhysX integrated into UE4 is based on the PhysX 3.3 SDK, if you want to search for information specific to the version that is integrated into UE4. Срок регистрации домена закончился
malospam, the reason for not being able to set mass is due to some history and practicality.
In UE3 it was possible to set mass directly. While this offers more control it has the problem that it requires the user to specify the mass for every object. We were seeing a lot of content where someone had accidentally left this value as default which would result in some really strange physics behavior (large dumpster or small box both had mass of 1kg.)
The intent of the new system is that you provide a mass scale which is used to determine the total mass. The idea here is that a car which is mostly hollow has a different mass scale than a solid rock. You can use physical materials to assign this mass ratio so that all rock like objects have their mass automatically computed without you having to enter anything in.
I agree that in some cases it would be nice to have complete control over the mass. Another thing to keep in mind is that concepts like moment of inertia, which depend on the mass distribution, are currently hidden from the user. If you specify the mass directly it would have to assume uniform distribution which might not be what you want (for example in the case of a can the mass distribution is on the edges of the object).
Hope that helps clarify things
In UE4 is “impulse” equivalent to momentum in Physics?
Afaik (or understand)
Not quite. Momentum is how much an object Is moving. A gathered force - driven by values (speed, mass, gravity, etc).
Add impulse adds an arbitrary amount of force - once.
a different node needs to be called to add it continuously.
in essence, depending on where you use/see this value, it should be the equivalent of pushing something once with X amount of force.
What you just described accurately fits with the definition of momentum and force in Physics. If we neglect constant variations, ie small aberrations to the equations originating of course from the inherent approximation of ue4’s physics computations (and computers in general) then Impulse = Momentum for all practical intents and purposes.
Of course, impulse in UE4 could be equal to Impulse in Physics, which is the integral of Force applied over a period of time (frames in computer terms). This would help with the naming too.
However, momentum more closely fits UE4 physics calculations (and is simpler than Impulse), because if Impulse in ue4 was impulse in physics, we would need to compute it based on Force, instead of just the mass and the velocity that Momentum requires (which is simpler).
Yet all these vectors are closely connected.
Physics
“the quantity of motion of a moving body, measured as a product of its mass and velocity.”
Impulse is a One time push that creates momentum Not momentum.