Embedding projectiles, and the fun that follows...
by Joshua "The Power Nap" Taylor · in Torque Game Engine · 07/25/2002 (12:47 pm) · 0 replies
My recent problems stem from trying to embed projectiles, mainly into players.
My main reason for embedding the projectiles themselves is having them explode after a while. I have projetiles sticking into the ground and detonating after a while, and I also have a system for them sticking into shapebase objects.
If that system worked, I wouldn't be posting this. When I have a projectile embed, I have it do a few things. Right below the "timeout" section of code in processTick I have it check to see if it is embedded, and if it is return. If it is embedded into a shapebase object, change position according to any changes in the shapebase object, then return.
With the addition of the latter(sp?), along with changing mCurrBackDelta to (0,0,0) when embedded, some problems happend.
-Whenever a projectile hits within my "container" (big yellow square that encompasses you in editor mode) it crashes.
-Whenever a projectile that explodes, explodes while stuck in the ground it crashes.
I know I can't get my code fixed with vague comments like that, what I would like is some info on the projectile class and how it functions. My feeling is that I'm playing with forces that I know little about.
My main reason for embedding the projectiles themselves is having them explode after a while. I have projetiles sticking into the ground and detonating after a while, and I also have a system for them sticking into shapebase objects.
If that system worked, I wouldn't be posting this. When I have a projectile embed, I have it do a few things. Right below the "timeout" section of code in processTick I have it check to see if it is embedded, and if it is return. If it is embedded into a shapebase object, change position according to any changes in the shapebase object, then return.
With the addition of the latter(sp?), along with changing mCurrBackDelta to (0,0,0) when embedded, some problems happend.
-Whenever a projectile hits within my "container" (big yellow square that encompasses you in editor mode) it crashes.
-Whenever a projectile that explodes, explodes while stuck in the ground it crashes.
I know I can't get my code fixed with vague comments like that, what I would like is some info on the projectile class and how it functions. My feeling is that I'm playing with forces that I know little about.