0
$\begingroup$

I was going to simulate planetary motion in blender and i have simulated the gravitational attraction between two planets with rigid body and force field. but i don't have any idea about how to give one of them initial velocity with physical accuracy If there is a way to do this with python that would be awesome!!

Here is my blender file : https://gofile.io/d/XnTyAw enter image description here

There is a problem with the common trick of giving objects initial velocity because it suddenly disappears : enter image description here

$\endgroup$
2

1 Answer 1

0
$\begingroup$

an initial velocity in a rigid body simulation is very easy to do:

  1. check animated checkbox and keyframe a location

  2. keyframe another location on another later frame (distance + keyframe distance will "make" the speed

  3. one keyframe later: disable animated checkbox and keyframe it

$\endgroup$
4
  • $\begingroup$ I've tried this and the object suddenly vanishes $\endgroup$ Commented Apr 23, 2021 at 10:47
  • $\begingroup$ that was your question, and that is my answer. of course - if there are some other circumstances like force fields or parenting (like you have) it behaves differently. One problem in your simulation is: you turned gravity on which is in your case - nonsense - because gravity in Blender is in one direction (normally -z - but you can change that). But in your case you don't want that, because you want "space gravity between objects) and not directional gravity(simplified) like on earth. $\endgroup$
    – Chris
    Commented Apr 23, 2021 at 10:57
  • $\begingroup$ It disappears because of gravity in -z direction!! $\endgroup$
    – Chris
    Commented Apr 23, 2021 at 16:08
  • $\begingroup$ so how to fix?(sorry i'm beginner) $\endgroup$ Commented Apr 23, 2021 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .