Skip to content

Commit

Permalink
Merge pull request #109 from nishihi6/develop
Browse files Browse the repository at this point in the history
Posted devlog-025
  • Loading branch information
nishihi6 authored Mar 4, 2024
2 parents e123877 + 5583983 commit 4386439
Show file tree
Hide file tree
Showing 7 changed files with 694 additions and 22 deletions.
24 changes: 12 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,18 @@ <h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>



<article class="post-item">
<h4 class="post-item-title">
<a href="/blog/posts/devlog_gl_09/">GameDev #9 カメラ(FPS・追従・軌道・スプライン) [Devlog #025]</a>
</h4>


<time class="post-item-meta" datetime="2024-01-29T03:15:04&#43;0900">
29 Jan 2024
</time>
</article>


<article class="post-item">
<h4 class="post-item-title">
<a href="/blog/posts/devlog_gl_08/">GameDev #8 入力システム [Devlog #024]</a>
Expand Down Expand Up @@ -203,18 +215,6 @@ <h4 class="post-item-title">
</article>


<article class="post-item">
<h4 class="post-item-title">
<a href="/blog/posts/devlog_unity-gamedev_01/">Unity-GameDev #1 企画・設計 [Devlog #020]</a>
</h4>


<time class="post-item-meta" datetime="2024-01-05T16:55:19&#43;0900">
5 Jan 2024
</time>
</article>



<p>

Expand Down
19 changes: 18 additions & 1 deletion index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,24 @@
<description>Recent content in Home on nishihi6</description>
<generator>Hugo -- gohugo.io</generator>
<language>ja-jp</language>
<lastBuildDate>Wed, 24 Jan 2024 04:19:53 +0900</lastBuildDate><atom:link href="https://nishihi6.github.io/blog/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Mon, 29 Jan 2024 03:15:04 +0900</lastBuildDate><atom:link href="https://nishihi6.github.io/blog/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>GameDev #9 カメラ(FPS・追従・軌道・スプライン) [Devlog #025]</title>
<link>https://nishihi6.github.io/blog/posts/devlog_gl_09/</link>
<pubDate>Mon, 29 Jan 2024 03:15:04 +0900</pubDate>

<guid>https://nishihi6.github.io/blog/posts/devlog_gl_09/</guid>
<description>ゲーム開発者の教科書:Game Programming in C++ を読んで理解したことについてを要約します(内容の転載を避け、詳しく説明しすぎないように配慮します)
ゲームプログラミング in C++ カメラ ここでは、4種類のカメラの実装を行う(FPSカメラ、追従カメラ、軌道カメラ、スプラインカメラ)
FPSカメラ FPSカメラ(first-person camera)は、キャラクターの視点から映すようなカメラである
PCの一人称シューターでは、キーボードとマウスを使う操作が一般的であり、WとSキーで前進と後退、AキーとDキーで左右移動(ストレイフ)、マウスの動きに合わせてビューがピッチングする
基本的な一人称の動き キャラクターを動かす
Actor.h 左右移動のため、右方ベクトルを取得するGetRight()を追加する
Vector3 GetRight() const { return Vector3::Transform(Vector3::UnitY, mRotation); } MoveComponent.h 左右移動の速さを表すメンバ変数mStrafeSpeedを追加する
ゲッターとセッターを追加する
float GetAngularSpeed() const { return mAngularSpeed; } float GetForwardSpeed() const { return mForwardSpeed; } float GetStrafeSpeed() const { return mStrafeSpeed; } //※ void SetAngularSpeed(float speed) { mAngularSpeed = speed; } void SetForwardSpeed(float speed) { mForwardSpeed = speed; } void SetStrafeSpeed(float speed) { mStrafeSpeed = speed; } //※ MoveComponent.</description>
</item>

<item>
<title>GameDev #8 入力システム [Devlog #024]</title>
<link>https://nishihi6.github.io/blog/posts/devlog_gl_08/</link>
Expand Down
2 changes: 1 addition & 1 deletion posts/devlog_gl_08/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ <h5 id="gameinitialize">Game::Initialize()</h5>
<p>アタッチされたすべてのコンポーネントの<code>ProcessInput()</code>を呼び出すため、オーバーライドできない</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cpp" data-lang="cpp"><span class="line"><span class="cl"><span class="c1">// ProcessInput function called from Game (not overridable)
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="kt">void</span> <span class="nf">ProcessInput</span><span class="p">(</span><span class="k">const</span> <span class="k">struct</span> <span class="nc">InputState</span><span class="o">&amp;</span> <span class="n">state</span><span class="p">);</span>
</span></span></code></pre></div><p><code>Actor</code>自身の独自入力のためのオーバーライド可能な<code>ActorInput()</code>の宣言を変更し、<code>InputState</code>のconst参照を受け取る商にする</p>
</span></span></code></pre></div><p><code>Actor</code>自身の独自入力のためのオーバーライド可能な<code>ActorInput()</code>の宣言を変更し、<code>InputState</code>のconst参照を受け取るようにする</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-cpp" data-lang="cpp"><span class="line"><span class="cl"><span class="c1">// Any actor-specific input code (overridable)
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">virtual</span> <span class="kt">void</span> <span class="nf">ActorInput</span><span class="p">(</span><span class="k">const</span> <span class="k">struct</span> <span class="nc">InputState</span><span class="o">&amp;</span> <span class="n">state</span><span class="p">);</span>
</span></span></code></pre></div><h5 id="componenth">Component.h</h5>
Expand Down
Loading

0 comments on commit 4386439

Please sign in to comment.