moveTo() function jittery at certain speeds
by GilForumGuy · in Torque Game Builder · 03/29/2010 (11:16 am) · 4 replies
Hello,
I have been calling the moveTo() function and I notice that at slower speeds the motion of an object moving is just fine. For instance a velocity of 10 is just fine. But when I increase the velocity to 50. The motion of the object moving becomes very jittery.
Anyone else have this issue and found a possible resolution?
I have been calling the moveTo() function and I notice that at slower speeds the motion of an object moving is just fine. For instance a velocity of 10 is just fine. But when I increase the velocity to 50. The motion of the object moving becomes very jittery.
Anyone else have this issue and found a possible resolution?
About the author
#2
I created a barebones project with an object moving and didn't notice any jitter. I'll do a few tests on my code and see how it goes.
Thanks.
03/29/2010 (6:18 pm)
Thanks for your response. I don't have the objects mounted. I am beginning to think that it is something I am doing in my script code that may be causing the jittering.I created a barebones project with an object moving and didn't notice any jitter. I'll do a few tests on my code and see how it goes.
Thanks.
#3
I've seen things jitter when it gets called repeatedly - I imagine due to floating point errors introduced when objects are moving at high speeds.
03/30/2010 (6:51 am)
Are you by chance calling the moveTo from the onUpdate callback? I've seen things jitter when it gets called repeatedly - I imagine due to floating point errors introduced when objects are moving at high speeds.
#4
03/30/2010 (10:40 am)
I am calling moveTo() without the onUpdate callback. The object starts to move once it has been selected. I'll definitely keep what you said in mind though so I don't run into the same problem.
Associate William Lee Sims
Machine Code Games