Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Knocking down the enemy

Discussion in 'Scripting' started by MrGrose, Feb 21, 2017.

  1. MrGrose

    MrGrose

    Joined:
    Feb 21, 2017
    Posts:
    2
    I have a student that is creating a game about human tipping(reversing the roles of cow tipping). The student and I need a little bit of help on how to code this using c#, as we are beginners to Unity and don't know a lot about coding. We want to be able to have the main character hit a human and knock them down to the ground.

    Thanks
     
  2. takatok

    takatok

    Joined:
    Aug 18, 2016
    Posts:
    1,496
    I think this is going to involve two steps
    1) Your going to have to learn about animations and creating them (With a program like Maya, or Blender). (This will probably be the most time intensive part)
    2) you'll need to create a model and put it in a Unity scene. Attach some animation to it that you created above. Then use Unity's Animation system to animate it when something collides with it. This part is pretty straight forward and there are numerous Tutorials in the Unity section about using Animations. Though like I said the harder part will be creating those animations in the first place.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    What @takatok says is true. If you just wanna do a quick silly demo, google up the Learn link above, and you can easily give an object physics, then apply force to the upper part of it and watch it tip over like a brick.

    Any more than that you need to start looking at ragdoll physics, or as noted above, a custom animation.