Hey, I have been wondering what is the units of AddForce function?
By units I do not mean the parameters - FVector. I mean the physical units. Is it in newtons?
I need this because I have an arrow which has a target. I want the arrow to get shot and get to the target.
I did not find any material on this so I have been thinking to use physics and use AddForce function. So the question is does AddForce’s units is newtons?
It isn’t in Newtons. You need to set very, very high values for AddForce (1M). But, you seem to be looking for AddImpulse (which also needs huge values).
It seems that the unit of measure is kgcms-1. This is why it requires such large numbers to provide considerable force.
However, the way that the AddForce function is intended to be used is as a continuous action instead of a one-time call. It would be best to use AddForce in a tick function to apply it over multiple frames to get the desired effect.
Hi.
Can anyone from Epic please confirm whether Black Phoenix’ post is correct.
Reading the forums leaves me with a fair amount of confusion with respect to physics units in UE4. Epic has a fair potential of improvement of their docs in this respect.
Best regards.
**[quote=“Darkstorm1997, post:1, topic:316861, full:true”]
Hey, I have been wondering what is the units of AddForce function?
By units I do not mean the parameters - FVector. I mean the physical units. Is it in newtons?
I need this because I have an arrow which has a target. I want the arrow to get shot and get to the target.
I did not find any material on this so I have been thinking to use physics and use AddForce function. So the question is does AddForce’s units is newtons?
[/quote]
Sorry to necro an old post, but thank you for clarifying this.
I am a total newbie (5 days so far! but I do come from Unity with few years of exp.) to UE so I wanted to leave this here so someone like me can benefit in the future.
You can actually test this out in the editor with below.
What is your pawn’s mass? I have tested this too and the AddForce() method seems to me to require the Acceleration (in cm/s/s), NOT force (in Newtons). Multiplying the AddForce() first parameter by mass makes by pawn go ridiculous speeds, assuming its Acceleration * Mass (which is Force in Newtons, times 100 for Unreal Units).
I have tested with different masses, using acceleration as the first param makes them all go down at the same speed, whereas using force as the first param (Accel * Mass) makes them go at much higher speeds than I expect.
If your mass is 1 kg in the example you illustrate, that would result in the expected behavior, but it seems based on my testing any other number results in unexpected behavior.