We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#問題 Laserクラスの衝突判定部分について 現状だとparallelVectorの値が正でも負でも当たり判定をしてしまうため、プレイヤーがレーザーの後ろに回り込んだ場合も当たり判定をしてしまう。
#解決方法 内積からプレイヤーとレーザーの位置関係を判定して、正の場合のみ当たり判定を行うようにする float hantei = asd.Vector2DF.Dot(destDirection, direction); if (hantei>0){ player.OnCollide(null); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#問題
Laserクラスの衝突判定部分について
現状だとparallelVectorの値が正でも負でも当たり判定をしてしまうため、プレイヤーがレーザーの後ろに回り込んだ場合も当たり判定をしてしまう。
#解決方法
内積からプレイヤーとレーザーの位置関係を判定して、正の場合のみ当たり判定を行うようにする
float hantei = asd.Vector2DF.Dot(destDirection, direction);
if (hantei>0){
player.OnCollide(null);
}
The text was updated successfully, but these errors were encountered: