Mount issues
by Helk · in iTorque 2D · 05/19/2009 (2:07 pm) · 28 replies
Hi guys, I'm experiencing an issue with mounting.
When I mount an object to another, and move the parent object there is a 1 frame delay before the mounted object moves.. it's almost like it's interpolating behind the parent object and this is very noticable with lower framerates.. Any ideas? Thanks
When I mount an object to another, and move the parent object there is a 1 frame delay before the mounted object moves.. it's almost like it's interpolating behind the parent object and this is very noticable with lower framerates.. Any ideas? Thanks
About the author
#22
FYI, there is a distinct lag in the MoveTo() function compared to SetPosition, and I'm not paticulary happy with this workaround. Also, it has a very negative effect on the framerate. Moveto() is dropping my framerate by about 10 fps compared to SetPosition().
I'm using the current version (1.3.1).
05/01/2010 (10:12 pm)
By the way, is this actually a bug or is it my lack of understanding of how to use the functions? Until someome actually replies, I have no clue.FYI, there is a distinct lag in the MoveTo() function compared to SetPosition, and I'm not paticulary happy with this workaround. Also, it has a very negative effect on the framerate. Moveto() is dropping my framerate by about 10 fps compared to SetPosition().
I'm using the current version (1.3.1).
#23
06/02/2010 (9:48 pm)
Just letting you know (if anyone is interested). After porting my GUI controls over to C++, the lag problem that I was experiencing with setPosition() went away. So it appears as though the mount-lag problem is caused by a delay in the scripting engine.
#24
06/02/2010 (11:48 pm)
sure its due to setPosition, not due to something like for example using the update callback which is a pretty impacting solution for example?
#25
It's possible that this problem has never occured on the actual device, or even on the Mac, and it might just be a desktop issue with the Windows version of TGBGame. I will do more testing, and let you know the results.
06/02/2010 (11:55 pm)
Actually, I've done some more testing and it seems like I only see the problem in Windows using the TGBGame on the desktop. I've just noticed tonight that I don't see any lag issues when I run it on the Mac, but I am actually still seeing it in Windows.It's possible that this problem has never occured on the actual device, or even on the Mac, and it might just be a desktop issue with the Windows version of TGBGame. I will do more testing, and let you know the results.
#26
Windows and OSX in no way reflect the real experience really. Because your desktop is a magnitude++ faster and the gpu can handle dozens of times more complex scenarios ...
You can do basic functionality testing on windows, functionality testing and real debugging / profiling on osx, all before + memory usage and instrumentation on the simulator and the real test on the device only :)
06/03/2010 (3:40 pm)
I assumed you tested it on the device.Windows and OSX in no way reflect the real experience really. Because your desktop is a magnitude++ faster and the gpu can handle dozens of times more complex scenarios ...
You can do basic functionality testing on windows, functionality testing and real debugging / profiling on osx, all before + memory usage and instrumentation on the simulator and the real test on the device only :)
#27
I am seeing the same behaviour on all platforms (TGBGame in Windows, TGBGame on the Mac, and on the device). If I use setPosition() there is a lag. The main object moves slightly ahead of the mounted objects and the effect looks bad. However, if I use moveto() everything works perfectly, exect that moveto() appears to be a bit more expensive and lowers the FPS.
BTW, yes, I am testing on the device. I do all of my coding (scripting and C++ code) on the PC, because I find it easier to get basic functionality working on that platform. But once I've ironed out the bugs and got my code working, I then port it to the Mac and continue testing there.
I got a bit confused because it turns out that I've always been using MoveTo() on the Mac, which I didn't realise. I've never actually tested setPosition() on the Mac until just now, and it turns out that the behaviour is exactly the same as I was seeing in Windows.
This bug was flagged for version 1.2, but it looks like it has slipped through the net and was never fixed.
06/03/2010 (5:54 pm)
Ok, I've retested everything and it turns out that my original conclusions (from a month ago) were actually correct. I think I must have been working too late.I am seeing the same behaviour on all platforms (TGBGame in Windows, TGBGame on the Mac, and on the device). If I use setPosition() there is a lag. The main object moves slightly ahead of the mounted objects and the effect looks bad. However, if I use moveto() everything works perfectly, exect that moveto() appears to be a bit more expensive and lowers the FPS.
BTW, yes, I am testing on the device. I do all of my coding (scripting and C++ code) on the PC, because I find it easier to get basic functionality working on that platform. But once I've ironed out the bugs and got my code working, I then port it to the Mac and continue testing there.
I got a bit confused because it turns out that I've always been using MoveTo() on the Mac, which I didn't realise. I've never actually tested setPosition() on the Mac until just now, and it turns out that the behaviour is exactly the same as I was seeing in Windows.
This bug was flagged for version 1.2, but it looks like it has slipped through the net and was never fixed.
#28
06/03/2010 (10:55 pm)
logged for version 1.5 .... not!
Torque Owner Mark Davies
I fixed the problem by using moveTo() instead of setPosition(). I was using setPosition() because I wanted to move something very quickly, but if you use moveTo() and set the %speed parameter to a very large value you can achieve the desired effect without any noticeable lag.
Just thought I'd post this in case anyone else is having the same problem.