CodingTrain / CodingTrain/Suggestion-Box

Ray Casting in Box2D Processing

オープン
#652 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
570
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

説明

I've been scouring the internet for ages looking for a good example/tutorial on how to use the rayCastCallback() function in Box2DProcessing. The only ones that I have found are for C++ or jBox2d and thus I don't know what libraries to import or proper syntax. If you could make a tutorial on ray casting in Box2dProcessing I would really appreciate it.

Just some context (if you care to know):
I was really inspired but you tutorials on Neural Networks and Genetic algorithms that I decided attempt to make a Neuroevolution program to create cars that can avoid other cars and park themselves. I have been able to implement the neural network, and the math needed to support it. Each car has a neural network that takes in inputs (from sensors) and produces output (steering and throttle). A car receives this input from its 12 sensors: 8 collision aversion sensors tell the car if it is about to collide with something, and 4 other senses tell it how far it is from its parking spot. The 8 collisions aversion (C.A.) sensors have fd.isSensor = true. I took into account that sensors collide with their own car (since they originate from it's center). The issue is that sometimes the collision listener beginContact/endContact does not trigger when it overlaps with a Boundary and only triggers in response to a Car when it collides with the center of the car. Sometimes, the sensors collisions do not register until the car collides with something. This defeats the purpose of the sensor. If you wouldn't mind revisiting collision listening in Box2D I would really appreciate you help so I can get on to the fun part-the genetic algorithm. Thank you!
![2017-09-19 2](https://user-images.githubusercontent.com/32319404/30895605-566107b4-a319-11e7-8959-96da3cfba2ff.png)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Box2DProcessing の rayCastCallback() API と、issue に記載されているセンサーおよび collision-listener の動作から始めてください。完成したコントリビューションでは、レイキャスティングに必要な import と構文を扱うチュートリアルを提供し、境界および車とのセンサーの重なりについて報告されている動作を説明してください。

索引モデルが issue の本文から書いたものです。

評価

領域
documentation, game-dev
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。