Boomerang-type Weapons
by Jerane Alleyne · in Torque Game Engine · 11/29/2002 (4:48 am) · 2 replies
This is quite a ways away for me to be starting on, but I thought I'd ask while I'm doing other things...
I'm considering a weapon that would essentially be thrown from the player and return to his hand, a bit similar to how you throw a lightsaber and it returns to your hand in Jedi Knight 2, or The Predator's disc in AvP 2. Right now I'm just trying to get an idea on how the best method to . The biggest question for me is what should be thrown out? Initially I was thinking about something along the lines of the throwing item/weapons function, and figure out a way to get the weapon to return to the player after a period of time. The other way I was thinking would be to create a projectile that does this, and just manipulate the weapons visibility when its thrown. I would just have to make sure the projectile doesn't harm the one throwing, among other things.
So in the end, I was wondering if you guys would have any opinions on which do you think is more practical, or if you have any alternative ideas that you think migh twork better. Who kows, might make a good weapons idea for Realm Wars too :)
Thanks!!
I'm considering a weapon that would essentially be thrown from the player and return to his hand, a bit similar to how you throw a lightsaber and it returns to your hand in Jedi Knight 2, or The Predator's disc in AvP 2. Right now I'm just trying to get an idea on how the best method to . The biggest question for me is what should be thrown out? Initially I was thinking about something along the lines of the throwing item/weapons function, and figure out a way to get the weapon to return to the player after a period of time. The other way I was thinking would be to create a projectile that does this, and just manipulate the weapons visibility when its thrown. I would just have to make sure the projectile doesn't harm the one throwing, among other things.
So in the end, I was wondering if you guys would have any opinions on which do you think is more practical, or if you have any alternative ideas that you think migh twork better. Who kows, might make a good weapons idea for Realm Wars too :)
Thanks!!
#2
I can handle the aesthetics, its just the other stuff :)
Returning to the player and the damage handling (I need the 'no harm player' idea fo ranother weapons concept as well) would be the things I'd have to look at. Also need to decide whether the weapon should go through the target or collide and immediately return, which would probably be simpler :)
The projectile does sound like the right way to go...It'll give me some time to think about how implementing it. Thanks a lot!
11/30/2002 (6:00 am)
Thanks a lot for the feedback!I can handle the aesthetics, its just the other stuff :)
Returning to the player and the damage handling (I need the 'no harm player' idea fo ranother weapons concept as well) would be the things I'd have to look at. Also need to decide whether the weapon should go through the target or collide and immediately return, which would probably be simpler :)
The projectile does sound like the right way to go...It'll give me some time to think about how implementing it. Thanks a lot!
Torque Owner Max Robinson
Here's how I would do it:
Give it an identical model to the weapon, and unmount the weapon after it is thrown by the player, and do some animation work so the player holds out thier hand. After that, you'd have to make a pretty unique projectile. First is collision handling. After it collides, you'd want it to bounce off like a grenade, which is already in on the current projectile, actually. Then, would you want it to just bounce around a bunch of times? Or immediatedly go back? Or follow where the player is looking? There'd have to be some physics-defying in here too. 100% elasticity and no gravity, or something like similar, to keep the flight going. Eventually you'd also have to make it rotate its velocity around so it points to the player, or just instantly aim it back to the player, whichever seems to fit the weapon more (instant is a little less realistic). Then there'd have to be damage handling. If it collides with a player, or other damageable, damage it, but if the target is the same as it's source object, then you wouldn't want to hurt it, and instead re-mount the weapon and go back to a normal animation thread, like just standing there with the weapon. Another factor is, while the boomerang is still in flight, you would want to disable weapon switching.
It's a very complicated thing to implement, really. The animation could probably be ignored, and the model could just be a placeholder. Another asthetic thing you'd probably want is to make it so somehow the model rotates while in flight. Another consideration, graphical, is that what direction would the thing be pointing in in the first place? I'd probably make it be flat on the x-y plane, and rotate around it's z axis.