While melee attacking and throwing fireballs and stuff is pretty easy to do, I can't really come up with a way to shoot a bow.

I would like for the bowstring to be pulled back and the arrow to shoot towards an enemy. Is there a simple way to do this?

For shooting the arrow I could spawn it on a bone and then do a magical switcheroo when it fires to just have an object move towards the enemy. I don't know how I would go about animating the bow's string to be pulled back. I'm using equipment viewers to show weapons and shields on characters.

I could still make the bowstring invisible, it is a string after all, but the lowpoly art style I'm currently using makes it look slightly silly.
  • I think this should be handled by your combatant's animations - you can use the equipment viewer to link parts of the equipment to parts of the combatant, e.g. having a bow-string bone on your combatants (for animations) linked to your equipment's bow string.

    As for the arrow - either have a dummy arrow on your bow to toggle on/off and spawn an arrow when actually shooting, or spawn the arrow on the bow (mount it) and send it flying (unmounting + movement) when shooting.
    Shooting the actual arrow could either be done via simple movement nodes, or using physics via the rigidbody nodes.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • So I think I should have 3 seperate equipment viewers for the bow then, 1 for the bow, and 1 for each side of the string. Does the equipment viewer take into account any of the bone properties, like scaling as well?

    Also, I might run into problems with having only one possible prefab to attach to the weapon data in ORK. Not in the position to check it out right now, but it's something I'm expecting to be a problem.
  • No, just 1 equipment viewer for the bow, but using the child linking in it to connect parts of your equipment to the combatant - like you'd have parts of a jacket linked to left/right arm bones.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Oh wow, for some reason I never saw that tutorial.

    So I should make sure the bow is skinned to the bones in blender(or maya or whatever) and ORK can pick up on that, as long as it's all named the same, the animation is there on the character, and I've setup the equipment viewer with child linking?
  • That's right :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • image

    I've tried a whole bunch of things, but nothing seems to work. D: In the image you can see the setup that I thought would most likely have to work when I look at the 'Child Linking'-how to.

    The bow prefab is shown, but the string is not animating along with the character's animation, it's just moving along with the equipment viewer on the cc_weapon bone. The bow is skinned and uses the same naming as the bones in the character it's getting attached to. I tried several different paths in the child linking section, this one seems like it should be correct.

    Can you see what I'm doing wrong? Might be hard from a single screenshot. Should the bow have all the same bones as the character rig all the way from the root?
  • Make sure the names match, e.g. on the first child link, the bow's child is defined as root/cc_Weapon, while it's root/cc_weapon on the prefab.

    Also, unless the first child link is moved independent from the bow/viewer, it's probably not needed - the weapon itself will follow the equipment viewer (since it's parented to it), so you only need to add the child objects that should move independent from it.

    When testing it, try moving the combatant's child objects for the strings and see if the bow's strings follow it - if that's the case, it's set up correctly.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Wow, I knew it was gonna be something dumb like that. It works now! Thanks a ton! This is awesome!
Sign In or Register to comment.