Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D 物理演算で三角形・四角形・ポリゴン・線分などの形状のセンサーを作れるように変更 #1251

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

Aikawa3311
Copy link
Member

新しくフォークし直して再度コミットしました。
以下前回のプルリクエストと同文です。

2D 物理演算で円形以外の形状のセンサーを作れるように変更を加えました。

P2RectP2Triangle などのコンストラクタの引数に bool isSensor を加えています。
P2BodyP2World などに addRectSensor()createRectSensor() などのセンサーを作る関数を加えています。
P2World::createCircle() にオーバーロードが 2 つ存在しているので、それに合わせて P2World::createCircleSensor() も新たに 1 つオーバーロードを加えました。

次のコードで動作を確認しました。
https://gist.github.com/Aikawa3311/a8bc38cc4667f5d93b3378ef402df276

@Reputeless
Copy link
Member

ありがとうございます。確認します。

Copy link
Member

@Reputeless Reputeless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

関数内のエラーメッセージを 3 箇所修正してください。

Siv3D/src/Siv3D/Physics2D/P2World.cpp Outdated Show resolved Hide resolved
Siv3D/src/Siv3D/Physics2D/P2World.cpp Outdated Show resolved Hide resolved
Siv3D/src/Siv3D/Physics2D/P2World.cpp Outdated Show resolved Hide resolved
@Reputeless
Copy link
Member

上記以外は LGTM なので、修正完了次第 v0.6.16 へマージしたいと思います!

@Aikawa3311
Copy link
Member Author

ありがとうございます。
先ほどエラーメッセージの内容を修正したものをコミットしてみました。
ご確認よろしくお願いします。

@Reputeless Reputeless merged commit eda3b92 into Siv3D:v6_develop Aug 8, 2024
2 checks passed
@Reputeless
Copy link
Member

Merged. Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants