After I had sorted the animations out, put them in order, made the transactions and then set the conditions for the transaction between the animations to take place I go into code. first I needed to get the bear to walk from side to side, I also got the bear to flip and go the other way if a wall or an edge is hit. after the bear starts moving from one side to the other I called the walking animation so that when the bear is moving the animation is played.
To make the bear flip to walk the other way when it hits a wall I had to make a empty game child in the bear call it wall check and then change the way it looked to a ball so I can see it at all times in the scene. I then set it if the wall check hits a wall bear will then flip the vectors, I then do the same but for edge check.
No comments:
Post a Comment