I started making a space game where the player can fly around between planets.
I’ve set up gravity between the player and planets through blueprints.
For some reason, I can’t get any objects to collide with one another unless I enable the physics. I don’t want to use Unreal Engine’s physics, but I obviously need collision. Is there some way to do this? Or maybe I could enable physics but disable all its features except collision?
Here are the collision settings for my player and planet actors:
Thanks for your reply. I’m not very familiar with UE5, so I’ll try to explain my set-up as best I can.
Both my planet and player have collision component attached to DefaultSceneRoot, with both being set to collision type ‘BlockAll’. I’m moving the player using the Add Actor World Offset node, with Sweep enabled. Somehow, this still doesn’t allow the planet and player to interact.
About gravity: I take a vector from player to planet, and use their masses to decide the length of this vector. Because gravity is working between the player and all planets at the same time, I can’t just let Unreal Engine handle gravity (I need to calculate the net force of multiple gravity values).
I am then moving the player with Add Actor World Offset, and don’t understand why it’s not able to collide.
It is quite happy to overlap its field with other components and quite capable of generating Lagrange points, for example. When Impulse Strength is set to a negative value, it acts as a gravity well. Ideally, you’d run this during Async Physics Tick.
I am then moving the player with Add Actor World Offset, and don’t understand why it’s not able to collide.
Depends on what we’re really trying to achieve - perhaps not the right tool is being used. For a controllable pawn one would take advantage of a floating movement component which would then produce superb sliding collision results.