projectile problems
by Dr. John Nobody · in Torque Game Engine · 02/01/2003 (1:24 pm) · 5 replies
hey all...
I have been messing with the weapons projectiles lately and I've discovered something rather odd. The larger you make a projectile (what is fired from a weapon), the further below the weapon node it is emitted from. At first I thought that the problem was with my own projectile objects, but after experimenting with increasing the size of the crossbow bolt from realmwars I discovered that this is just a general thing that torque does, it seems to work ok if you have very small bullet sized projectiles but if you want anything larger then its fired from an odd location (but the particle stream is correct) this might be a question for the more seasoned torque pros. How come it does this and how can I fix it?
thanks!
Eric Risser
I have been messing with the weapons projectiles lately and I've discovered something rather odd. The larger you make a projectile (what is fired from a weapon), the further below the weapon node it is emitted from. At first I thought that the problem was with my own projectile objects, but after experimenting with increasing the size of the crossbow bolt from realmwars I discovered that this is just a general thing that torque does, it seems to work ok if you have very small bullet sized projectiles but if you want anything larger then its fired from an odd location (but the particle stream is correct) this might be a question for the more seasoned torque pros. How come it does this and how can I fix it?
thanks!
Eric Risser
#2
02/02/2003 (1:00 am)
Is this a .dts file you have altered and added or the standard projectile.dts scaled within the onFire function?
#3
02/02/2003 (1:02 am)
I altered the .dts, didnt use a function
#4
02/02/2003 (2:44 am)
just want anyone who was thinking of responding to this know that I fixed this problem... I was resizing the plane as an object instead of a subobject (which torque doenst like), thanks anthoney for helping me out in IRC. got it working pretty good now, if anyone could point me in the direction of a resource or thread talking about resizing the projectile with that funtion mentioned earlier than I'd really appriciate it :)
#5
Better yet, rather than sizing the same projectile and creating a new dts you can use the scale variable in the onFire of the weapon.. Just use scale = "2 2 2"; in the created datablock or replace the 2's with the size of your choice. Since the scale var is not called normally the game assumes the scale is 1. I dont have access to my source or I would leave an example to view.
If ya have any other questions let me know.
Sam
02/02/2003 (6:39 pm)
Did you reset the transform of the bounding box after you sized it? If not just delete the bounds box and place a new one at the center of the shape. I would use the align tool in max or just visualy line it up in MS.Better yet, rather than sizing the same projectile and creating a new dts you can use the scale variable in the onFire of the weapon.. Just use scale = "2 2 2"; in the created datablock or replace the 2's with the size of your choice. Since the scale var is not called normally the game assumes the scale is 1. I dont have access to my source or I would leave an example to view.
If ya have any other questions let me know.
Sam
Torque Owner Dr. John Nobody