Creating a basic "fixed" solar system to host a 3D space travel simulation
The easiest approach is to do a numerical integration of the equation of motion of your system. For that you need to remember that the gravitational force of $a$ on $b$ is $$\vec{F}_{a\rightarrow b} = -G\frac{M_a M_b}{r_{a\rightarrow b}^{3}} \vec{{r_{a\rightarrow b}}}$$
where $\vec{{r_{a\rightarrow b}}} = \vec{x_b} - \vec{x_a}$ and that
$$ M\vec{a} = \sum \vec{F}$$
where $M$ is the mass of your object, $\sum\vec{F}$ is the sum of the forces applied to the object and $\vec{a}$ is the acceleration.

To do the simulation, you then have to follow this numerical scheme


set some initial conditions to your problem: initial position $\vec{x_p}$ of the planet and $\vec{x_\star}$ of the star and initial velocities $\vec{v_p}$ and $\vec{v_\star}$.
compute the force $\vec{F}$ of the star on the planet and the accelerations of the planet and the star:
$$ -M_\star \vec{a_\star} = M_p \vec{a_p} = \vec{F_{\star\rightarrow p}}$$
update the speed of the planet and the star using the respective acceleration:
$$ \vec{v}(t+\Delta t) = \vec{v}(t) + \Delta t\times \vec{a} $$
update the positions of the planet and the star using their respective velocity:
$$ \vec{x}(t+\Delta t) = \vec{x}(t) + \Delta t\times \vec{v} $$
recompute the distance between the planet and the star $\vec{r_{{\star\rightarrow p}}} = \vec{x_p} - \vec{x_\star}$ and go back to 2.