Answer the question
In order to leave comments, you need to log in
How to make a game like wofenshtein 3D?
I would like to make a game like wolfenshtein 3D on js canvas. But I have a problem. I don't know how to rotate the ray that the player throws. Rotate the very coordinate of the end of the ray. I couldn’t implement it. Yes, I know there are lessons on the Internet. But I would like to learn only this part. Then I myself. Thanks to everyone.
Answer the question
In order to leave comments, you need to log in
First, the beam has no end, only a beginning. You probably have a cut.
x = cos(fi) * R
y = sin(fi) * R
x = cos(fi) * R + x_игрока
y = sin(fi) * R + y_игрока
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question