<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C++11以上</anon>
    <anon>C++</anon>
    <anon>Cocos2d-x</anon>
  </categories>
  <description>タイトルにCocos2d-x（2D用のゲームエンジン）でと書きましたが考え方自体は普遍的な円と矩形（長方形）の当たり判定の処理についてです。と、言っても条件式式が結構難しい（当方には説明が難しい）ため解説は以下のサイトが分かりやすくまとまっていますのででそちらで確認ください。 ftvoid.com 四角形と円が重なるときの条件の出し方ややトリッキーなのかと思います。 実際に実装するとこんな感じになります。 ちゃんと白い丸の範囲に赤い四角形が入ったときに当たったと判定されています。 実装環境 実装コード CollisionUtilクラス 角度なし版 使い方 角度あり版 使い方 実装環境 今回の実…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2019%2F09%2F26%2F004257&quot; title=&quot;Cocos2d-x 3.17.1で円と矩形（長方形・角度あり）の衝突判定 - PG日誌&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20190926/20190926005807.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-09-26 00:42:57</published>
  <title>Cocos2d-x 3.17.1で円と矩形（長方形・角度あり）の衝突判定</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2019/09/26/004257</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
