Strange problem when adding images
by Zeinad · in iTorque 2D · 05/20/2009 (8:21 am) · 7 replies
For some reason that makes no sense to me, when I add one more image (any image) into the editor my triggers stop working. It becomes as if they do not exist, however when I make the bounding boxes for things be visible I can see they are there, but they are not being reacted to in any way. If I remove an image they begin working once more.
About the author
#2
I feel dumb for not trying that first, but it did not fix the problem. Interestingly, my enemies are not supposed to collide but when my triggers break they also start colliding with each other.
05/20/2009 (8:57 am)
SetUsesPhysics(true) is applied to the player, enemies, and triggers now, previously I had forgotten to apply it to the triggers.I feel dumb for not trying that first, but it did not fix the problem. Interestingly, my enemies are not supposed to collide but when my triggers break they also start colliding with each other.
#3
05/30/2009 (1:33 pm)
@Zeinad - If this issue is still a problem, could you please post step by step instructions on how to replicate this?
#4
Basically, the problem seems to occur any time the player is spawned before the first enemy. If even one enemy is spawned first then all enemies work, but if the player is spawned first bad times are had by all.
Right now my solution is to spawn in and delete an enemy right when the level loads, then spawn in the player.
I have not checked at all yet to see if this problem exists in regular TGB or not, but it should be noted that I am using the PSK, I don't know if that would relate to this problem or not.
06/01/2009 (8:47 am)
This issue is still sort of a problem, I found a hacky way of fixing it that I would rather not have to do but it works so... better than not working!Basically, the problem seems to occur any time the player is spawned before the first enemy. If even one enemy is spawned first then all enemies work, but if the player is spawned first bad times are had by all.
Right now my solution is to spawn in and delete an enemy right when the level loads, then spawn in the player.
I have not checked at all yet to see if this problem exists in regular TGB or not, but it should be noted that I am using the PSK, I don't know if that would relate to this problem or not.
#5
where is the SetUsesPhysics() methodm description??? Can´t found it in docs.
I´m having an issue with my game that someone thinks have to do with SetUsesPhysics() but it´s weird since everything is working fine on simulator.
The problem is on the iPhone where some game elements doesn´t move at all (it seems that the moveTo() method is not being called because something that have to go flying away after a mouse down event doesn´t go).
Event: Mouse Down.
Expected response after Mouse Down: start rotation (using rotate() method) and movement to a predefined point using moveTo() method.
What could be wrong here and how could be fixed?
Thanks
Mike
06/04/2009 (9:35 am)
I feel dumb asking this:where is the SetUsesPhysics() methodm description??? Can´t found it in docs.
I´m having an issue with my game that someone thinks have to do with SetUsesPhysics() but it´s weird since everything is working fine on simulator.
The problem is on the iPhone where some game elements doesn´t move at all (it seems that the moveTo() method is not being called because something that have to go flying away after a mouse down event doesn´t go).
Event: Mouse Down.
Expected response after Mouse Down: start rotation (using rotate() method) and movement to a predefined point using moveTo() method.
What could be wrong here and how could be fixed?
Thanks
Mike
#6
To get things working right you need to call setUsesPhysics(True) for any object that needs to move, rotate, or use physics, etc.
06/04/2009 (10:03 am)
That does indeed sound like a setUsesPhysics() problem. Basically, this is a iTGB specific thing that is used for optimization. The default for all objects is false, however this only affects objects on the phone not the simulator or computer.To get things working right you need to call setUsesPhysics(True) for any object that needs to move, rotate, or use physics, etc.
#7
Thanks. I will try this later tonight (not at home now).
But a quick question after posting (editing now): is this the only step I must take? I mean, there is no method description elsewhere, so I´m wondering is the method is recognized once playing on the iPhone... If something else is needed to fix this, please let me know.
Mike
06/04/2009 (10:05 am)
@Zenaid,Thanks. I will try this later tonight (not at home now).
But a quick question after posting (editing now): is this the only step I must take? I mean, there is no method description elsewhere, so I´m wondering is the method is recognized once playing on the iPhone... If something else is needed to fix this, please let me know.
Mike
Torque Owner Bret Patterson