Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by snipeorigin · Aug 20, 2015 at 09:54 PM · collision3dactionhitbox

HOW TO Manage Hitbox For Weapon Activating During Animation (Great Detail Inside)

Hi, I am making an 3D action game and am tackled with the task of creating good combat like Monster Hunter or Dark Souls.

I already have the animations and am pretty sure I'll keep using colliders unless someone points me to an super efficitve way while staying as flexible as colliders are.


  • The problem at hand with an example:

"Attack_Animation_1" ("AA1") of "Player_1" is called who holds "Sword_1" ("S1") in his right hand.

"S1" has multiple collideres as hitboxes attached that now have to be activated or deactivated, also colliders specifically for "AA1". Depending of the frame of "AA1".

  • The actual problem:

Now I need to communicate through "AA1"'s Animation component which colliders of S1 have to activate/deactivate. Meaning a communication(class/script?) between "AA1" and "S1" has to happen.

After that I have to be able to swap S1 with Sword_2 which then has to use the same hitboxes when AA1 is played

This is what I imagine a HitboxManagerClass could handle. I have no idea where to start, though.

Can you help me to find a soloution to the problem? How can I make "AA1" and "S1" communicate and call reactions from the enemy in a timely manner?

TL;DR:

  • How to manage hitboxes of weapons during animations of the character wielding the weapon

  • Hurtboxes of enemies and

  • How to trigger behavior and other animations like subtracting HP and stunning.

  • How to make the weapon interchangable and keep functionality

  • Need guide of some sort

My game will be weapon/sword centric and so I need to manage hitboxes on different kind of weapon animations fast and accurately to generate a good player feedback.

Any good source of help would be great!

Thanks in advance!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Priyanshu · Aug 21, 2015 at 08:35 AM

One way is to activate/deactivate colliders directly from animation.

How to do it:

  • Click on Sword Object (Which has diiferent HitBoxes as children).

alt text

  • Create new clip. Call it "Attack_Animation_1".

  • On 1st frame click: Add Property > arrow of hitbox which u want to edit plus sign of IsActive. To add that property inside animation.

alt text

  • Add properties in successive frames. As suggested above.


2.png (16.0 kB)
1.png (2.1 kB)
Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Priyanshu · Aug 21, 2015 at 08:36 AM 0
Share

alt text

3.png (46.6 kB)
avatar image snipeorigin · Aug 21, 2015 at 11:37 AM 0
Share

Thanks, this is a great answer! How can I make the Swords interchangable?

How can this system work when I use Sword_2 which is supposed to have the same properties?

avatar image Priyanshu · Aug 21, 2015 at 11:54 AM 0
Share

Do u change sprites in sword attack animation or u move the sword object?

If you move the sword object then you can use the same animation for different swords. And just need to change sword sprite of Sword GameObject when using Sword_2.

avatar image snipeorigin · Aug 21, 2015 at 12:00 PM 0
Share

Well I am working in a 3D-Environment, but the same principle applies. Have a base_sword object and just load the properties and model in.

I think I can work with that. But I'm still curious what other solutions there are.

Thanks a bunch!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Hit points how to detect where is collision? 0 Answers

3D enemies keep sliding on the terrain 1 Answer

How to make a bullet go through certain colliders? 1 Answer

Sider Joint 2D in 3D 0 Answers

How do I change the collision in showcase the book of the dead? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges