Sorry for my bad english, I’m not a native english speaker.
So I’ve been trying to achieve a planetary-like gravity (when an actor-e.g. cube- comes close to an actor that I consider a planet, it pulls the cube to the planet) where modifying the actor’s velocity and/or rotation isn’t needed. I have spent hours and hours looking trough forums and Youtube tutorials but found nothing helpful; either it’s not what I want or it doesn’t tell you how to do it.
So I’ve been experimenting for many hours and came up with this.
- Create an actor blueprint
- (Optional) Create a static mesh which you want to have ‘gravity’ , I don’t recommend making it the root
- Add Radial Force (component) and attach it to your static mesh if you have one, set it in the dead center of it.
- Set Impulse Strenght to 0 and and make Force Strenght a negative number (e.g. -50000) and adjust the Radial Force radius.
- Under Radial Force Component you can select what objects will the force affect-
- You’re done
https://forums.unrealengine.com/filedata/fetch?filedataid=171772&type=thumb
Again, remember to set Auto-Activate to true or use the Activate node.
I’ve posted this because i hope it comes in handy for those who were also unable to find what they were looking for before. I would love some feedback on how to make this even better.
Thanks