- Home /
Constant motion when applying a constant force?
I have a bullet that shoots quickly. I have made a function to find the distance traveled by the bullet each frame. The results I have got look correct accept for occasional jumps that I cannot explain. Here is an extract of my results:
1.779392, 0.4, 0.8, 1.2, 1.6, 3.6, 2.4, 2.8, 3.2, 3.599999, 7.599998, 4.399999, 4.800001
I am fairly new to coding and very new to Unity so I am not sure if the reason for these jumps is a problem in my code or if Unity's motion is not steady. Can anyone explain?
FYI the code I use to accelerate the bullet is:
void FixedUpdate ()
{
rigidbody.AddForce(transform.up * power, ForceMode.Acceleration);
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613191355im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Ipad: Use sensor movements to control character 2 Answers
Moving a character in relation to camera position? 1 Answer
2D Character Motion 0 Answers
stuttering motion 2d objects 0 Answers
How do I access CoreMotion and the Android equivalent? 0 Answers