Yes, I can tell you that state is the state of the physics body type you are polling for. When you say, “What is confusing is that RigidBody3D has most of the same methods, so why do we need the state param?” you are kinda right.
The idea is to do your physics, applying torque, force, or anything that moves the Rigid body in _physics_process(). _integrate_forces is sort of done in there for you and is used for more low level control over physics. Stuff you will need later once you understand the Vector math and physics needed for more complex stuff that isn’t right out of the box.
You really don’t need to use _integrate_forces at all because physics are taken care of for you in the _physics_process() method, so I wouldn’t use the _integrate_forces() method but for specific things.
An example of KISS would be to do it all without physics, no bodies, just move objects around with math, and prevent something from moving given it’s distance from something else, not a sphere shape. Then when you realize your limitations, slowly build upon that with experience. Later you’ll know where you need something and where you don’t with time.
Try a small experiment. You have your sphere at world origin (Vector3.ZERO or 0,0,0). Now outside of the sphere, in the World node, make an empty Node3D at origin at the center of the sphere/planet but not a child of it. Put your fish (just a mesh, no phys body needed) in that as a child. Move the fish itself, not the invisible node, up on his local Y axis so it is just above the sphere. Now rotate the empty node fish parent in it’s global axis by hand in the editor. This will move the fish around the sphere and keep his -Y or down vector pointing to it, since the fish is bound to it’s parent rotating. Changing the parent’s rotation makes him move, turn, and strafe… while changing his local Y position changes his distance to the sphere (or rather his parent that is also at origin) .
Of course, this is pretty dumb but if you had several of these instanced, all with their own empty pivot, going in different directions, heights, and speeds, it would simulate the movement of fish around a small planet. Orbital bodies even. it isn’t a physical but a visual simulation. Of course you run into problems where simply going rotation.x += 1 doesn’t behave like proper spherical traversing or orbital movement. For one, it’ll be way to fast the further away it is, so you either have to compensate, use math and distances to design your own collisions and avoidance, or figure that you now need to scrap the idea and use the physics tools that help you do that.
So the idea is simple, kinda stupid, but it just works and should help teach you the math and geometry without the more complex physics mixed in, which is just another layer of vector math on top of the Trig and Geometry. Then when you run into a problem or limitation, that is when you try to learn something that overcomes that problem, or maybe become intuitively inspired to solve it or try something different that might help you build that intuition. Maybe. I feel like you approach problems more experimentally and may not like your hand held as much as you just need someone to explain a thing or two while you experiment. There are a hundred different ways to any one thing, which works best is sometimes moot, what is optimal is usually the main programming problem, but what gets the job done and gets you paid is more the reality… or not paid but finished so you can move on maybe.