コード例 #1
0
 //If gravity is enable, this transform will be attracted to the ground object in this scene.
 private void FixedUpdate()
 {
     if (enableGravity == true)
     {
         gravity.Attract(transform, allowRotation);
     }
 }
コード例 #2
0
ファイル: GravityBody.cs プロジェクト: IgorCarvai/GameDev2
 void FixedUpdate()
 {
     planet.Attract(transform);
 }