Tuesday, 29 March 2016

Rectifying Common Physics Problem in Your Game Development

There are games that use physics engines to help things in the game move and react. The use of a physics engine can add immersion as well as emergent game play, but at the same time, if not used appropriately, can result in game-breaking issues. This blog discusses about the ways to determine and rectify the common physics problems in 3D game development with Unity 3D.

Common Mistakes and Ways to Fix Them

Following are the common physics mistakes often seen in game development. The ways used for fixing these issues have also been discussed:

  • Inappropriate Scale:

In majority of the games, players assume that the scale of the world is related to Earth’s scale. Suppose, in a game, an enemy is falling from a height. The players would expect the foe to come down at the same rate as he would if he falls in reality on earth. If the speed of falling is too slow or fast, it may detract from the immersion, specifically if the one falling is human-sized. 

  • Use a RigidBody As Well As a Character Controller:

The game developer assumes that a Character Controller is required for controlling their avatar. But the players want the avatar to be influenced by gravity and similar things in the environment. The issue is that a Character Controller is created for more traditional controls as seen in first person shooter. Gravity and certain physical forces affect a RigidBody. You need to select a Character Controller if you wish to have complete control over the way a player moves. Again, if you wish your character to be moved by a Physics engine, you need to use a RigidBody. In including a RigidBody to a character, you may wish to restrict rotation so that the player does not tumble. 

  • Objects Rolling Constantly:

Suppose, you are developing a golf game. In this instance, you may find that the golf ball is not stopping and rolling constantly until it finds a hole. In reality, the glass blades on a golf course offers rolling resistance and slow down the ball. However, in Unity, you need to use artificial stopping forces to stop the ball. Using angular drag may be helpful in this case.

  • Objects with No Bounciness:

All the objects bounce following an impact. However, the internal, default physics material of Unity does not have bounce. There will be no bounce until you apply physics material to the things showcased in your scene with a bounciness value more than 0. This problem can be rectified with the creation and assignment of your own default physics material in the Physics Manager.

Keep in mind the above mentioned suggestions during 3D game development with Unity 3D.

No comments:

Post a Comment