I'm new here and I hope this is something that is easy to answer.
I have a sun and planets, the planets orbit the sun with gravity. the player can orbit both the sun or planets or depending on the trajectory a combination of many. but i will just use the sun, now the sun is set in some x,y,z place.
the gravity from the sun to the player works on velocities that effect the x,y,z of the player and are calculated as xv,yv,zv
player(x-xv,y-yv,z-zv) and would update player(x,y,z) with the new coordinates
this part works.
i also have the player velocities: player(pxv,pyv,pzv)
and there are player angles: Player(pitch,yaw,roll)
and the player moves by combining them. This works as well.
Now my problem, I cannot figure out how to alter the xv,yv,zv and the player(pxv,pyv,pzv):Player(pitch,yaw,roll) into a harmonious act.
example experienced: say the player is gravitating to the sun,and the player moves to the sun as well, when then i stop the velocity increase of the player the gravitating velocity does not change with the player's velocity increase.
and it's not just to the gravitating body, its in any direction. Any help would be great. Thank you.