So I am writing a small script to set initial speeds for objects in the Rigid Body system. It is really bare bones right now, but it essentially sets a keyframe for the selected object on the frame number of a variable called start_frame
.
The goal of the script is so I can choose a start frame and a speed, and the object will have all of the correct keyframes set so it can just launch off with an initial speed. The problem is that depending on what frame I set start_frame
to be, the cube reacts differently.
Here is what I mean:
If start_frame
equals 1, the object is launched and then falls off the plane.
If start_frame
equals any number greater than 1, the object doesn't travel as far.
From what I understand, there shouldn't be any difference because the distance between the start and end keyframes is always the same.
I looked at the graph editor but the only change I am seeing between the two conditions is being shifted, just like it should be.
I am so confused why changing the frame from 1 to anything above 1 would give such a different result.
So is there anything special about frame 1? And if so, how can I avoid this problem in my script?
end_frame = start_frame + speed
so "end frame" is always "speed" frames away from the "star_frame" $\endgroup$start_frame
defines the frame to start the animation on. I just want the cube that is launched to have the same physics no matter what frame it is launched on. I will upload a GIF to explain what I mean. $\endgroup$start_frame
set to 1, and the second shows it set to frame 2. The result is different and I am very confused. $\endgroup$start_frame
is odd it will fall off the plane , but if it is even it will stop before, even at larger numbers $\endgroup$