- Home /
faster calculation without skipping(projectile movement)
hi to all am facing a issue in some calculation.i have a high speed projectile which moves really high speed.i have done all the calculations of the projectile in update function,but some times (as calculations are as per frames)it is skipping.for example my object started in first frame it is fine bt the second frame or 3rd ...it is going very far away i.e.,going below the terrain.i want to move it in every value which results in the calculation.i.e.,unity calculates for every frame bt some times it is skipping it is not at all constant.how can i rectify this issue.will it works good if i use fixed update rather update. thanks in advance
Use 'Time.deltaTime' as a multiplier for all your movement values. This will make your physics take the framerate into account.
Answer by Ashkan_gc · Jun 04, 2013 at 08:47 AM
The question is not that obvious but generally to make any calculation frame rate independent you should multiply it's value with Time.deltaTime If you need a constant time between the interations of the calculation then either use FixedUpdate or InvokeRepeating method to adjust the constant time between function calls easily.
Your answer
Follow this Question
Related Questions
Getting Input every few frames? 2 Answers
Update/FixedUpdate motion stutter (Note: This is NOT a novice deltaTime question) 16 Answers
Checkibg Rigidbody2d and component problems 0 Answers
Fixedupdate rate stays at 90 instead of 60 1 Answer
What's FixedUpdate 2 Answers