Announcement

Collapse
No announcement yet.

How to program horse?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to program horse?

    So im trying to program a horse but i don't know where to get started.
    I first made the horse be a pawn.
    But where is the function in pawn that adds movement to the pawn ?
    or maybe it's all done through booleans?
    Please help.
    Some cool unreal projects you may like!


    Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

    Download the demo Download the demo
    external link Dropbox DropBox

    Become a c++ Professional now C++ Networking Tutorial

    #2
    Use the acceleration variable, thats move the pawns, in the pys_walking physics.

    If they are in phys_none, you can use move and movesmooth comands in the tick event.

    I did my horse extending from my npc classes, with some diferent functions for foot placement and others.
    Provisional blog: http://cobaltudk.blogspot.com.es/
    Videos: https://www.youtube.com/user/cobaltudk
    Facebook: https://www.facebook.com/babylonprojectgame/

    Comment


      #3
      Yes but wich function or what variables do you have to use in order to achieve it ? handle the movement.
      What function processes the variables of movement i could do it in UE4 but with UDK it's a little bit more complicated.
      Some cool unreal projects you may like!


      Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

      Download the demo Download the demo
      external link Dropbox DropBox

      Become a c++ Professional now C++ Networking Tutorial

      Comment


        #4
        Only put "pawn.acceleration = vect(10,0,0);" in the tick event. With the physics = Phys_walking. It's the usual way to move the player, giving an acceleration value.

        With Phys_none you can use "move" or "movesmooth". "Pawn.move(10,0,0);" will move your pawn 10 units. Put it in the tick and the pawn will move continuisly. The vector is a displacement, a delta.

        You can use a normalized vector to get the desired direction, then multiply it by the desired velocity float.

        And whit this way (using move/movesmooth) you can "accumulate" movement, and then do a move every few ticks, instead a move in each tick. Add to a vector each movement, then after some ticks do a move using that vector and reset to 0. You can use move/movesmooth/setlocation for that.

        You gain a lot of performance in this way. Seems that moving actors is one of the things that more cost has.

        I use it with my boats, when they are far, or not visible. So the jump is less appreciable.
        Last edited by CobaltUDK; 07-30-2018, 11:50 AM.
        Provisional blog: http://cobaltudk.blogspot.com.es/
        Videos: https://www.youtube.com/user/cobaltudk
        Facebook: https://www.facebook.com/babylonprojectgame/

        Comment


          #5
          OK that's cool to take in mind, well I also saw that processDrive abd ProecssMove are functions to take in mind.
          Some cool unreal projects you may like!


          Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

          Download the demo Download the demo
          external link Dropbox DropBox

          Become a c++ Professional now C++ Networking Tutorial

          Comment

          Working...
          X