News › Forums › General Discussion › Pause animation
This topic contains 6 replies, has 3 voices, and was last updated by prime 3 weeks, 2 days ago.
November 16, 2022 at 9:49 pm #34184
I am following the tutorial series provided by RAIN.
My character now punches into another person.
I am building a fight scene.
Right now Max(Humanoid AI on left) is punching thru, Baldie (Humanoid character on right).
How can I build it so that:
Max does not punch thru Baldie
Baldie responds to punches whenever it is hit (collision detection)
Game is being built for an iOS app so resources are limited but please share your thoughts either way.
Long term I am trying to build a Mortal Kombat type game with many interactions between characters when punched/kicked:November 16, 2022 at 9:54 pm #34185
I’m not sure how useful this might be to you, but I follow this guy’s series and learn a lot about Unity in general. Here is a link to one of his later projects dealing with making a fighting game:
-Iuxeayor ;>November 18, 2022 at 10:31 pm #34347
yeah it did not hep me with the issue.
Any other suggestions?November 19, 2022 at 7:58 am #34350
I don’t think there’s a completely straightforward answer to your question. What is it you want to happen? Do you want Max to stand that close when punching, or do you want him to stand at a certain distance so the punch looks right? If he is standing that close, do you want him to pause the punch on impact, or do you want Baldie to be knocked back? What method do you want to use to tell when the collision occurs? If this is a typical fighting game, you don’t necessarily need colliders - you might just mark certain points and do a quick distance check. Lots of questions, but it all depends on what you are trying to do.November 20, 2022 at 8:09 am #34369
I’m open to any of those ideas.
My goals are:
1) MAX: Pause the punch animation mid-way on impact and return to default position to start the next punch
2) BALDIE: Make the character respond to impact with a new animation
I’m not tied to any specific method (colliders, distance check, etc.) — just want to learn how to do this right.
Also, my characters don’t have to be so close. It can be at a distance as long as it gives me the desired effect.
I’m excited to learn moreNovember 28, 2022 at 11:35 am #34429
any update on this thread.November 30, 2022 at 9:23 am #34440
I don’t think there is a specific “right” answer for you. You will probably just have to jump in and start experimenting with different methods until you find something that works.
I would probably start with colliders and add triggers to handle the collision. The triggers will be code, so you will probably deal with damage and other code related issues in the trigger, then set a few state variables to send information back into RAIN to deal with managing fighter state and animation.
You must be logged in to reply to this topic.