Game Development Community

MountForce bug and possible solutions

by Giorgio Bertolone · in Torque Game Builder · 02/21/2009 (12:05 am) · 3 replies

Hello,

I mounted an object on another object (a draggable one) but the MountForce bug (TGB#136) doesn't set the mount force to 0 and when I move the draggable object the mounted oject follows it not in a rigid way.

This happen in the latest version of iTGB and TGB. Mel May already found a solution (www.garagegames.com/community/forums/viewthread/78864) to fix this problem but requires to modify the source and recompile.

I want to verify with you guys if you know other workarounds to rigidly mount an object without having to recompile.

Eventually is it possible to get a beta version of iTGB with this bug fixed?

Thanks,

Giorgio

#1
02/24/2009 (3:49 am)
Hey.

Before I knew about this bug, I thought perhaps I had screwed something up in my game to cause this behavior.

I found that while the game was running and the elements in question were onscreen, if I used the console to enter in some script and mount the two objects together, it worked correctly.

I have since implemented the proposed fix from that thread, which didn't exactly fix it.

Note -- I have no idea what is going on deep down, but here's a handful of observations:

1) - if the objects in question are all onscreen, and

2) - if the game is already running (i.e. the objects are NOT mounted in the level data)

then it seems to work properly (without source changes).

So try this (if it makes any sense in your game's arrangement). This is how my code is set up:

schedule for 100 milliseconds - loadlevel
schedule for 200 milliseconds - create objects
schedule for 250 milliseconds - mount objects together

When in doubt, delay the call for mounting, and make sure the objects are onscreen. May not help, but I figured I'd offer up what worked for me (so far -- not tested on Mac).



#2
02/27/2009 (12:02 pm)
Hi Tim,

in order to fix this bug I ended up modifying the source and recompiling iTGB (Mac) and now it works properly.

But thank you anyway for your reply and suggestions.


#3
02/27/2009 (2:17 pm)
@Tim: If the fix I submitted doesn't help you then I suspect you're seeing another bug as the problem was identified and definately fixed.

I'm sure what your seeing is real, I don't doubt that, but from my intimate knowledge of how it all works, the fact that something is on screen has nothing whatsoever to do with the mounting system. The mounting gets updated whether its on the screen or not. Indeed, the rendering is just essentially a pick call by the window which gets a list and calls the render method on all of the returned objects.

If you have a simple project that demonstrates your problem then please send it to me and I'll get a fix for it to you.

Melv.