Questions tagged [angles]
An angle is a figure formed by two rays starting from the same point.
138 questions
0
votes
1
answer
118
views
Why are my angle calculations not working properly?
I am using this code:
...
1
vote
1
answer
67
views
Instantiate prefab behind moving player
I'm trying to instantiate a bomb prefab behind the player.
The script below works fine when the y rotation is 0,90,180,360. The bomb is instantiated behind the player.
But for other angles, the bomb ...
1
vote
1
answer
631
views
Using both look_at and flip_h in Godot
I am trying to have a player running in a side scroller platformer with its arms independent from its body, so that the arms can follow the mouse (to aim).
The issue is that when the character goes to ...
0
votes
1
answer
3k
views
Using atan2 vs dot product to get an angle in 2D games
I have some confusion that I need to be cleared up about the atan2 function.
I am making a game in Godot where a 2D ship rotates to face some object in space by ...
0
votes
2
answers
118
views
Determine which cannons on a ship can hit a target [closed]
I have a ship that will shoot targets, but cannons on the right side should never try to shot at targets on the left side of the ship. Thus I have created sectors using the ...
1
vote
2
answers
110
views
Detecting the avatar's position in relation to the camera's angle
How to detect the avatar's position in relation to the camera's angle.
I want to detect whether the camera is facing the avatar's lef, right or back side.
What's the best way to do this?
0
votes
1
answer
306
views
Alter vehicle angle to match that of ground
I am trying to align a non physics vehicle to the same angle as the floor, using blueprints in UE4.27
At first, I used normals, but this has undesired effects when going over things like speed bumps.
...
0
votes
1
answer
233
views
Problems with reflection angles during collision resolution between circle and rectangle vertices (2D)
I'm having a hard time trying to resolve the reflexion angles when the ball collides with one of the brick's corners (square vertices) in my brick breaker game.
The collision detection system is ...
0
votes
2
answers
804
views
Calculate the angle of rotation between two vectors relative to the first vector
I'm trying to get the angle between two 2D vectors relative to the first vector input. Every method I've tried has given me a value between 0-180 degrees but doesn't tell me whether it was a clockwise ...
-1
votes
2
answers
247
views
How to interpolate angular data properly
I have been trying to interpolate raw angular data in degree (for a flow map grid) but any attempt fails because there is always two path, and I can't figure out how to interpolate on the shorter one ...
1
vote
1
answer
320
views
How do I apply real time physics to a 2D game in Java?
I'm developing a 2D Brick Breaker style game in Java and want to apply some real time physics to it, especially to the paddle/ball interections. Nothing too complex; just applying some of the physics ...
1
vote
1
answer
102
views
Trigonometry to move an arm around axis in 3D space
Hello I have a question about rotating a Rod hinged to a fixed point (so it swings all around), and targets. short form, I would like to know how to find a rotation that would point my rod (while ...
0
votes
2
answers
816
views
Rotating only 2 axes of rotation quaternion to "point" in a direction
Note: I am using the Unity DOTS ECS framework, which contains less maths functions, but I can probably implement the same functions from standard unity if the code is public. This question is not ...
1
vote
2
answers
1k
views
Limit rotation/direction of two axes with seperate values (Vector3)
Issue
I'm trying to create a vector pointing in a direction towards a target, and then using that vector rotate a child transform to face the target while limiting the rotation on the X and Y axis, ...
0
votes
1
answer
1k
views
Pygame : problem with calculating an angle between two points
I've been struggling to calculate the angle alpha between an object and a certain point M so that I can move that object to M.
To calculate alpha, I'm using ...