Disable swipes until current position = next position. You can use Lerp to move him between last position and next position. So, it is arbitrary as far as moving the chicken. The actual animation part is not important for moving in the environment and interacting with walls. You can raycast out one jump distance to see if something is there. What I would do is make it so the object moves exactly the right amount per swipe. Physics can really mess up a simple game, you need to be pretty good to use physics without "weird stuff" happening. All you have to do is tag the logs as ground.Īlso, for the ground, raycast from all four corners, there may be a boxcast or sweeptest method but I never needed it so I never used it. You can make cross road easily without the physics engine.Īlso, I would make it so he falls if there is no ground below him via raycasting, this way you can easily implement ditches and water. Just think of physics as being there for when you need realism. Physics is expensive and for use when you need to simulate physics. When he hits a car, arrest his motion and parent him to the car. Cars and other things can be handled without physics as well. Click to expand.What I would do is make it so the object moves exactly the right amount per swipe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |