HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Thrown Objects Returning to Hand  (Read 2378 times)

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Thrown Objects Returning to Hand
« on: Jul 12, 13, 09:46:21 PM »

Just a quick question - how plausible - or even possible - would it be for an object thrown by a player - a weapon, for example - to be returned to their hand? The major problem with this idea that I can see is the fact that the distance between the player and their target would always be variable, making it hard to create a good looking animation.
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Thrown Objects Returning to Hand
« Reply #1 on: Jul 12, 13, 10:26:54 PM »

There a few different ways of making the object return to the character's hand. One is by having it magically reappear in their hand, like a throwing axe. Another way is like arrows in a quiver, where they automatically get another one. The more difficult would be making the weapon be more of a one-and-only type thing where the player would have to run and get it, or it would fly back to them magically (like capt America's shield). Sometimes its best to use what would make it seem more useful for the player, having it reappear in their hand. This way they dont have to wait for it to come back. Think of running away after they threw it, it would have to travel a lot farther then when it was thrown. Trying to hit a moving a object, like a player running, also can take extra AI cycles for the object to check - reachDesitnation(), no keep checking. But that would depend on the speed of the return.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Thrown Objects Returning to Hand
« Reply #2 on: Jul 12, 13, 11:13:52 PM »

Traditionally those are pretty much the 2 options. Player is holding attachment. Turn off attachment, animate thing from a to b. animate thing from b to a, turn on attachment. Or have the weapon be a permanent effect, like a particle, then do the same thing. A lot depends on how you're setting up and building your characters and animations.
Logged

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Thrown Objects Returning to Hand
« Reply #3 on: Jul 13, 13, 08:09:18 AM »

I wonder how ToR did it, with their lightsaber throws etc.

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Thrown Objects Returning to Hand
« Reply #4 on: Jul 13, 13, 08:57:50 PM »

If you have a set target, then it's not hard to do with the fx system, just like the default engines fireball follows the player. Basically have it do two FX effects one out one back.

If you just want it to fly x distance forward and back, then not to bad, if you need it to fly forward x distance then back and do damage to things hit on the way, it's a much different direction to think on.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Stadi_Thompson

  • General Accounts
  • *
  • Posts: 324
    • View Profile
Re: Thrown Objects Returning to Hand
« Reply #5 on: Jul 19, 13, 03:24:07 PM »

I wonder how ToR did it, with their lightsaber throws etc.

You use the FX system. You make a lightsaber model, then tell the light saber to go a specific on bone the NPC. Then do the reverse to come back to your hand all in the same FX. The FX system is insanely powerful.
Logged