3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Unity(C#)】重力をスクリプトから任意のタイミングで操作する方法

Last updated at Posted at 2018-11-10

この記事は

『プログラミング完全未経験からUnityでの開発現場に迎え入れてもらえた世界一の幸せ者』

の記事です。そのつもりでお読みください。

以下のスクリプトを重力を制御したいゲームオブジェクトにくっつけて任意のタイミングで呼び出せばOKです。

Rigidbody rd;

rd = this.GetComponent<Rigidbody>();
rd.useGravity = true;
    

"true"でON、"false"でOFFです。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?