Mounted Objects Disappear.(BUG)
by Jack-S- · in iTorque 2D · 10/25/2011 (8:29 am) · 11 replies
Hi I seem to have stumbled across something, I tried to mount a small static sprite onto a much larger static sprite however it seems to disappear whenever I run the game.. Ive checked the rendering layers, the mounting options, collisions and physics but the object ceases to exist when the game is run.
Is this a bug? and if so, are there any work arounds??
Thanks in advance.
Is this a bug? and if so, are there any work arounds??
Thanks in advance.
About the author
#2
10/25/2011 (10:02 am)
The mounted object is basically a clone of the object im mounting to so its datablocks are all in place, and I was carefull to name it uniquely aswell so im not sure whats going on.
#3
Thanks in advance.
10/26/2011 (11:22 am)
Hi Im still seeing mounted objects disappearing when the game is running, Im mounting these objects via the editor. Could someone possibly validate this for me?? Thanks in advance.
#4
???unsure.
10/26/2011 (6:27 pm)
I had some troubles with mounting recently. I was taking an object, creating 7 link points then adding sub objects onto it, via the editor. Some were not mounting in game play, link points were disappearing.. it was messy. Since (it was a while ago) but I believe if you investigate there are problems with link points and such mounting multiple objects. Not sure about one mount tho.???unsure.
#5
www.garagegames.com/community/forums/viewthread/128030
10/27/2011 (3:09 am)
There is issues with iTGB 1.5 and mounts in the editor. See the following url. Not sure if this is related to your issue or notwww.garagegames.com/community/forums/viewthread/128030
#6
I have tried editing the sort points aswell and created more than one but the monuts still disappear at runtime.
10/27/2011 (5:50 am)
Hi I have looked into that thread however Im still having problems. Im not trying to mount multiple objects, just the one t2dsceneObject to another however the mounted object disappears at runtime...I have tried editing the sort points aswell and created more than one but the monuts still disappear at runtime.
#7
10/27/2011 (6:15 am)
I played around with link points etc with some funny results with objecsts appearing in wrong places, also, the mount wont respect the movement of the object that it is mounted to even though its mount force is set to 100
#8
With a mount force of 0 it indicates a rigid mount, in which it simply just sets the position of the object to the mount position instead of calculating forces and such.
also if you are setting the mount offset in script or code, note that an offset of (1.0f, 1.0f) is (sprite.getHalfSize().X, sprite.getHalfSize().Y) in pixels. This could be why your mount is disappearing when you run your project if you assumed that the numbers passed were pixels for the offset. example:
30 x 30 pixel sprite.
setOffset(20, 20);
actual pixel location = (300, 300)
(30 * 0.5) * 20 = 300.
10/27/2011 (8:18 am)
try setting the mount force to 0.With a mount force of 0 it indicates a rigid mount, in which it simply just sets the position of the object to the mount position instead of calculating forces and such.
also if you are setting the mount offset in script or code, note that an offset of (1.0f, 1.0f) is (sprite.getHalfSize().X, sprite.getHalfSize().Y) in pixels. This could be why your mount is disappearing when you run your project if you assumed that the numbers passed were pixels for the offset. example:
30 x 30 pixel sprite.
setOffset(20, 20);
actual pixel location = (300, 300)
(30 * 0.5) * 20 = 300.
#9
@ Micheal Is this getting fixed in a patch?
Thanks in advance.
10/30/2011 (1:12 pm)
@ Daniel hi, im not setting any offsets in code or editor, im purely through the editor mounting the object to another. Yet the object disappears upon the game running which is still happening.@ Micheal Is this getting fixed in a patch?
Thanks in advance.
#10
02/29/2012 (1:38 pm)
I am really discouraged by the mounting bug!
#11
Just use the "mounTO" command, you can find it within the reference section in the docs.
Hope this helps.
02/29/2012 (2:43 pm)
@ paul - Hi, there is a way to get around this by simply coding the mounts within script. I used the editor interface to get the exact pixel points where I wanted to mount objects to on the object and then coded the mount via script using those pixel references within the editor (the points on the object where you want to mount are I believe referenced by pixels-- I think lol).Just use the "mounTO" command, you can find it within the reference section in the docs.
Hope this helps.
Torque Owner rennie moffat
Renman3000