Questions tagged [trigonometry]
A branch of mathematics that studies triangles and the relationships between their sides and the angles between these sides.
149 questions
3 votes
6 answers
2k views
How can I rotate a 16-bit signed integer vector?
I am trying to rotate a vector made of two signed 16-bit coordinates (-32768 to 32767). Using a LUT for sin/cos, I can use the standard method for rotating a vector: ...
0 votes
1 answer
109 views
Calculating semicircle points of a scaled CapsuleCollider2D
I have a very simple code that draws the shape of a pre-defined capsule. It handles everything well, except the case when the GameObject to which the ...
0 votes
0 answers
122 views
How do I move a point in a specific direction in 3D Space?
I know how to move a point in a direction in 2D space it's like this: pointX += sin(angle) * movementSpeed; pointY += cos(angle) * movementSpeed; How do I do the ...
0 votes
1 answer
111 views
Why are my angle calculations not working properly?
I am using this code: ...
0 votes
1 answer
65 views
What is the relation between the magnitude of the cross product and dot product of two vectors?
If I have an equation: |A×B|=A.B What would be the angle in between A and B?
0 votes
1 answer
177 views
How do I determine which pixel is under the cursor when looking at an equirectangular image through a camera?
I am working on a game. The camera is freely rotatable by the user. The background is displayed from an equirectangular image. I need to know which pixel of the background image is located under the ...
1 vote
1 answer
307 views
How to overshoot with direction_to
I've managed to get my sprite enemies shoot at the player with ...
0 votes
1 answer
352 views
rotating a sprite with mouse cursor
i am learning how to make a 2d game using sdl and c++ and am currently trying to rotate the sprite so that is always facing the cursor, my game is set up with an entity component system, i have a ...