Aller au contenu

Photo

Shooting arrows


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
AfterDune

AfterDune
  • Members
  • 29 messages
Yesterday, in the cutscene editor, I was trying to make a character use his bow and shoot an arrow. Using the bow went fine. I placed an arrow object in the scene and when the character was doing the "grab bow and arrow" animation, I linked the arrow to the character, so he was sort of holding it.

From what I know (correct me if I'm wrong!), I have to manually move that arrow to its target, correct? Okay, I can live with that. But is it possible to stick the arrow to the target? I tried linking it to the target (same way I did before), with a "(VFX) Left Upper Arm" for example. The arrow does stick to the target, but is turned around - the arrowhead doesn't go in the body, it's the "end" (lack of better english) that's sticking in the body. Doesn't look very nice.

Some questions I have:
- Is there another way of guiding the arrow to its target? I fear there is not, but that's not a very big issue.
- Is there a way to make the arrow stick with the target, where the arrowhead goes in the body, not "upside down"? Or if "link to" is the way to go, could someone enlighten me on how to do it right?

Thanks!

#2
AfterDune

AfterDune
  • Members
  • 29 messages
Anyone?

#3
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
On the creature firing the arrow, put a quiver of arrows in his inventory (they are in the _Global/HOLDING folder) and increase the stack size. I THINK that will actually make him fire arrows.

#4
AfterDune

AfterDune
  • Members
  • 29 messages
Just tried it, I don't think that's the way to go. Does anyone know? :-(

#5
tmp7704

tmp7704
  • Members
  • 11 156 messages

AfterDune wrote...

- Is there a way to make the arrow stick with the target, where the arrowhead goes in the body, not "upside down"? Or if "link to" is the way to go, could someone enlighten me on how to do it right?

The link can be done with "offset" option active. When this option is enabled it causes the engine to add position and angle defined by keyframe of the object you're linking to the position and angle determined by the link itself. So if you want your arrow to be rotated the 'proper' way create a keyframe for it with Yaw of 180 and Y set to 0.5-0.9 m depending how deep you want your arrow to go in -- when combined with rotation and position applied by the engine, it should give you the proper result.

Modifié par tmp7704, 31 mai 2010 - 04:59 .


#6
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
Might be worth asking Suhnder (http://social.bioware.com/289/) how he did it, since the first episode of his machinima has a ranger firing off a couple arrows and it looks just like in-game.



If he does answer you please let us know here :)

#7
tmp7704

tmp7704
  • Members
  • 11 156 messages
For what it's worth, the default game cutscene which has archers firing (the funeral scene after Redcliffe plot) has arrows put in the scene as props which are initially set to hidden and lined up with where they should fire from. When the archers finish their animation the props are set to visible and moved from there the usual way by the looks of it.

#8
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I guess thats the only way since even if the animation had projectiles embedded in it, the game has no way of knowing where those arrows are supposed to go.

#9
AfterDune

AfterDune
  • Members
  • 29 messages
I figured that one (where I have to manually place and "shoot" the arrow), but that's alright.

I'm going to try tmp7704's way with the offset. I've played with the offset-options before, but whenever I used it, I couldn't find the arrow anywhere. Now that you mention the yaw, perhaps the arrow was inside the character... I'll report back when I know more, probably tomorrow.

Thanks for the help so far, guys :-).

Modifié par AfterDune, 31 mai 2010 - 07:36 .


#10
tmp7704

tmp7704
  • Members
  • 11 156 messages

AfterDune wrote...

I've played with the offset-options before, but whenever I used it, I couldn't find the arrow anywhere.

It's probably because typical values of XYZ coordinates for the items are in 50-100 range, so that would mean with the offset active they are placed long way from your scene. To quickly find the item you can always select it in the list of cutscene objects and then use the 'Focus on Object" and 'Zoom on Object' commands, these will snap the view right to where the item is (as long as you use them with User View window active, rather than a Camera one)

#11
AfterDune

AfterDune
  • Members
  • 29 messages
Ah, I managed to do it :-). It's not very nice at the moment, but those are details. Here's how to do it (this may not be the best way, but since I/we couldn't come up with an easier method......):
  • First I link the arrow to the archer, not using offset and use "(WPN)Right arm" as the node.
  • When the animation is there when the archer fires the arrow, stop the "link to"
  • At that moment, align the arrow to about where it was, so the arrow doesn't just suddenly (dis)appear
  • Then, when you want the arrow to hit the target, manually place the arrow where you want it to be and create a keyframe when you think it's nice. Link the arrow to your target and set offset to true. In my case, I shot the arrow in the lower torso, so make sure to put the node to the same thing. If you use "head" here, but place the arrow in the torso, the arrow will follow the head's movements and the result will be odd. So, use (VFX)Lower torso here (in my example).
Then, we're gonna make sure the flight of the arrow is as it should. For some reason, without this step, my arrow would fly off somewhere, then fly to the target and hit the stomach. Easy to solve.
  • Write down the x/y/z and yaw/pitch/roll of the arrow object when it first hits the body (so basically, get the position+orientation of the keyframe you just set)
  • Now, set your timeline indicator somewhere between the keyframes you just set (so, between the "aligned with bow" keyframe and "stuck in target" keyframe). Don't move the timeline (!!), just click the arrow object (if it isn't selected already) and manually edit the x/y/z and yaw/pitch/roll. Yes, you get it, enter the values you just wrote down.
  • Rightclick on the arrow object (on the left side of the timeline) and choose "key selection". This will create another keyframe with the values you just entered. Make sure the end transition is "bezier" or "linear".
  • Now, it's not perfect yet. So move the keyframe you just made to right before the other keyframe (the "stuck in target" one). Let's say the "stuck in target" is on frame 154, then move the keyframe you just made to 153.
  • Play the cutscene and see your archer load his arrow and shoot the target :-).
I also made an image, to try to make it a bit easier to understand:

Posted Image
click here for a bigger image

I hope this method works for you guys too. It worked for me! I hope I explained it all clear enough for you guys.

If you know of better ways, enlighten us :-).

Modifié par AfterDune, 01 juin 2010 - 03:23 .


#12
AlistaiR154

AlistaiR154
  • Members
  • 5 messages

Hello) I don't know is there anybody alive, but i have a question.
The last post in this topic so helped me, but i have a problem with arrow.
When i do "Link to......CrustHook6", my arrow shoot in SIDE of stomach, not as seen in picture of AfterDune.

 

I don't know what i've missed, so i can't understand this problem.
I have a screen with this problem, but i don't know how i can paste a picture.
Please, help me)
P.S. Sorry for my English. I am so bad in this language(



#13
Yara C.

Yara C.
  • Members
  • 242 messages
Hello) I don't know is there anybody alive,

Well, yes, it is only the forum dying and you are obviously causing the last convulsions. ;)

 

I don´t know either what you could have missed. But I suggest to follow a slightly different approach.

The regular behaviour of linking the arrow to the victim´s torso with the setting node: (VFX) Lower torso / offset: false will result in a hit into the side.

Therefore you always need the offset = true setting.

 

You leave the first part unchanged. (the action linked to the archer) but should better delete the second linking action to the victim and related keyframes. All but one keyframe: the keyframe for the final position.

The arrow will be animated by keyframes. A linear or bezier transition between the keyframe where the arrow is released and the keyframe where the arrow hits the the body.

 

Add a new link action to the arrow two keyframes after the last keyframe (the struck moment).

 

Choose the same values for the link properties as before. Actor, node and off-set.

 

Now we´ll continue a bit different.

 

The link to the victim should be still selected. Select main menu 'Edit'. The option 'Add Bracketing Keys' should be now available.

(Read the information in the dialogue window to learn more about bracketing keys and the 2 different ways they can be used. But that is optional.)

 

What you need is option 2. That means you have to click 'No'.

 

A pair of key frames are now set automatically at the start and at the end of link action.

At the start of the link action you have now 3 keyframes in a row. The first is of no use anylonger and can be deleted.

 

bracketing2.png



#14
AlistaiR154

AlistaiR154
  • Members
  • 5 messages

Well, yes, it is only the forum dying and you are obviously causing the last convulsions. ;)

 

 

I know that, and it is sadly. Because there is a lot of interesting information :crying: 
Thank you for help so much) I'll try it. 

I don't think that there is someone alive)
 

P.S. Nise Arrow's armor)) I don't know how it sounds in English))