Hello all, I find that the default UProjectile component does not allow us to add air resistance to it.
The most crucial steps of the default Uprojectile component is compute velocity and compute acceleration.
As we can see, in the compute acceleration function ,there is only acceleraction caused by gravity.
So I create a child class of the default projectile component.
Unfortunately, I’m still a cpp noob. I don’t know how to format the code of the new cpp page. When I see the blank, I freeze.
I know the logic (or pseudo code) for adding air resistance, but I don’t know what’s the syntax to use to change the compute acceleration function inherited from its parent projectile component class…