Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
417 views

Isometric view : what is the right angle to use?

Wikipedia states in an isometric view, all angles must be equal to 120. I am building my assets by making screenshots of some 3D models, so I can get any point of view on them. I tried to capture ...
0
votes
0answers
45 views

Euler angle and quaternion rotation [duplicate]

If I have a player at [12,0,54] and an enemy at [5,0,-9], to calculate the Euler angle for the enemy to rotate and face the player, would I subtract enemy minus player positions and then divide that ...
3
votes
2answers
218 views

How to calculate left/right oriented angle between two 2D vectors? [duplicate]

I would like to calculate angle between two 2D vectors. Here's a picture of what I'm trying to achieve: I have an obstacle line segment AB and incoming moving PC. If I'm coming from one side C¹D¹ ...
0
votes
1answer
28 views

Point to coordinate function

I am working on a game in which I need an enemy ship to point towards the player. Here is the equation I came up with: angle = sin-1(abs(y1 - y2)/√(x1 - x2)2-(y1 - y2)2) This essentially takes ...
2
votes
1answer
60 views

How can I move an object in a direction other than the ordinals?

I want to move a game object from its current position to the mouse position, but my current code only ever moves in one of the eight ordinal directions. In other words, I want it to move along the ...
2
votes
2answers
45 views

Calculating angle a segment forms with a ray

I am given a point C and a ray r starting there. I know the coordinates (xc, yc) of the point C and the angle theta the ray r forms with the horizontal, theta in (-pi, pi]. I am also given another ...
0
votes
1answer
112 views

How do I find the angle between two 3D angles represented in this form?

I have two 3D angles, represented by [a1,a2] [a1,a2] where the a2 is < 180. My coordinates are represented as [X,Y,Z], where X,Y,Z are 64 bit ints (longs in my lang). My direction angles are ...
1
vote
0answers
105 views

unity3d-Find angle between 3 vector3 points obtained from swipe

I was trying to find the angle between 3 vector3 points obtained from the screen swipe. The first vector3 point is the first touch position fp, the second is some intermediate touch ip and the third, ...
0
votes
0answers
81 views

JBullet quaternion to Euler angle conversion causes strange flipping behavior

I am making a game using JBullet (a Java port of C++'s Bullet library) for the physics and LWJGL for the graphics. However, JBullet measures angles in quaternions and LWJGL uses Euler or ...
0
votes
4answers
140 views

Bridge made out of blocks at an angle

I want the player to select 2 points (vectors). With these 2 points a floor should be created. When these points are parallel to the x-axis it's easy, just calculate the amount of blocks needed by a ...
3
votes
2answers
602 views

How to find point on a circle that's opposite another point?

How do I find the coordinate of point and angle value on circle sprite which placed on opposite side of sprite from a touch point and the center point of the sprite? I know A position, B position and ...
0
votes
1answer
74 views

3d rotation of a Gunner unit to shoot the target

I'm developing a scenario to shoot incoming targets by a specific gunner unit, however I'm confused to actual logic of shooting an object with a gun. I'm working in 3D environment. I'v target's ...
1
vote
1answer
449 views

How to move Vector2 along angle?

These are my Vector2's that I am using for this function. public Vector2 position = new Vector2(); public Vector2 velocity = new Vector2(); public Vector2 movement = new Vector2(); public Vector2 ...
1
vote
1answer
207 views

How do you make a bullet ricochet off a vertical wall?

First things first. I am using C# with XNA. My game is top-down and the player can shoot bullets. I've managed to get the bullets to ricochet correctly off horizontal walls. Yet, despite using similar ...
2
votes
3answers
281 views

How to rotate a 3D character on top of a plane with an isometric picture on it

How to calculate the angles of the 3d charater so that it fits into the isometric environment projektet on a 2d plane? Also, how do you calculate the rotation of my character? What I want to achieve: ...
-2
votes
1answer
192 views

How to know the relative facing angles between two players? [closed]

I want a grappling system similar to Tekken, in which different grapples animations are performed depending on which side of the opponent the player performing the grapple is facing. For example, ...
1
vote
1answer
97 views

Dealing with angles in 3D

In 2D everything is easier to understand. I'm not enought experienced to join people who say that 3d is the same: you JUST need to add a dimension - THAT adding a dimension is my problem, bacause I ...
1
vote
1answer
802 views

Using atan2 to calculate angle between two vectors

I understand that: atan2(vector.y, vector.x) = the angle between the vector and the X axis. But I wanted to know how to get the angle between two vectors using atan2. So I came across this solution: ...
-1
votes
2answers
135 views

What Should the Limits On the Camera's Pitch Be? [closed]

What should I be using as the limit to how much a camera can pitch in a first person video game? I'm assuming most video games use around the same value - so if I can use that value in my game, it ...
34
votes
4answers
2k views

Why are radians preferred over degrees in game development?

I've been looking up the definition of radians and found out that mathematicians prefer them because they are derived from pi instead of being completely arbitrary like degrees. However, I have not ...
0
votes
1answer
20 views

Angle Adjustment on the Y Axis

I just started learning 2D game development using CreateJS and I was reading this article about angular velocity to learn how to correctly move a sprite in both x and y axis. I understand most of it ...
0
votes
0answers
81 views

How do I ADD gravitation to a rotation matrix?

I have ported the Matlab script from https://instruct1.cit.cornell.edu/courses/bionb441/LSystem/ to POV-Ray and everything works fine (although I'm not quite sure why). To navigate a "turtle" through ...
0
votes
1answer
720 views

How to shoot on direction of touch

I'm new to the Corona SDK(and I also suck in trigonometry) and I'm trying to achieve this: Shoot a bullet from the player, towards the direction of the point the user touched, but always with ethe ...
0
votes
1answer
899 views

gamemaker getting a ball to bounce 90 degrees off of a 45 angle

I am trying to get a circle to bounce off a 45 degree diamond shap using Gamemaker Studio. I would like the ball to bounce in straight lines so my directions would be 0, 90, 180, or 270 degrees, ...
3
votes
1answer
118 views

Surface normal to screen angle

I've been struggling to get this working. I simply wish to take a surface normal and convert it to a screen angle. As an example, assuming we're working with the highlighted surface on the sphere ...
4
votes
2answers
1k views

Perfect FPS camera angle

I am making a multiplayer FPS and I am in search of some helpful tips on the perfect FPS camera angle. Because it is a multiplayer, I am making a full body model holding the gun, I find, however, that ...
4
votes
2answers
265 views

Getting an angle in degrees from north

This may have been asked already, but I was unable to find it, because I don't really know what I'm looking for. I drew a picture: I need theta. I've seen various solutions using Vector.Dot, and ...
2
votes
1answer
4k views

How to extract euler angles from transformation matrix?

I have a simple realisation of entity/component game engine. Transform component have methods to set local position, local rotation, global position and global rotation. If transform is being set new ...
2
votes
2answers
321 views

2D field of view detection inverted

I'm not sure if the title matches what I'm actually facing I'm trying to test if I can see a point is in my field of view (in the context of an NPC seeing in it's direction.) I know that: cos0 = ...
18
votes
2answers
3k views

What is the view perspective angle of most 2.5D isometric games

I examined several quite popular games to determine what perspective angle they are using. For the purpose I created a grid that is 45 and 60 degrees isometric viewed and put it onto a screenshot (of ...
2
votes
2answers
613 views

How to get enemy to follow character using angles? (atan2)

I have an enemy and a character to control. I want to get the enemy to follow the character in a straight line. I already found the angle in which the enemy needs to travel. double angle = ...
1
vote
2answers
700 views

Matrix Rotation with three Angles

I want to rotate a form with three given angles fo each of the three axis. But the GLM rotation function takes only one angle and a vector as arguments. How can I convert between both formats?
3
votes
2answers
381 views

what does AngleVectors method in quake 3 source code does

I just downloaded quake 3 for learning purposes. I know some of some linear algebra(basic vector math ie: dot,cross product). However I can't decipher what below method does, I know what is yaw,pitch ...
1
vote
1answer
1k views

Unity: parallel vectors and cross product, how to compare vectors

I read this post explaining a method to understand if the angle between 2 given vectors and the normal to the plane described by them, is clockwise or anticlockwise: public static AngleDir ...
1
vote
2answers
439 views

Tangent to a circle through a point

I'm trying to figure out how to calculate the following angle: I know center (p1) and radius (r) of a circle. Given a point p3 I want to calculate the angle a such as the tangent (tan) of the circle ...
3
votes
2answers
423 views

Calculating the correct particle angle in an outwards explosion

I'm creating a simple particle explosion but am stuck in finding the correct angle to rotate my particle. The effect I'm going for is similar to this: Where each particle is going outwards from the ...
1
vote
0answers
245 views

Getting and Setting Rotation in XNA around the Center of my Model with XNA

Alright, so I'm currently debating how I want to do this. Basically this is what I'm trying to accomplish. I've created a system to allow me to make my environment a little bit easier. I'm ...
1
vote
1answer
454 views

Ball bouncing at a certain angle and efficiency computations [closed]

I would like to make a pong game with a small twist (for now). Every time the ball bounces off one of the paddles i want it to be under a certain angle (between a min and a max). I simply can't ...
1
vote
2answers
253 views

How can I determine the direction of turn?

I want a function that gives me the turn direction for my object (1 or -1) I have two angles 1 - current rotation(A) 0 <= A <= 360 2 - target rotation(B) 0 <= B <= 360 int turnSide ...
-3
votes
1answer
609 views

c# xna move Image using two Vectors?

initially image placed (0,0)th position and where ever i touch that is end position. Now i got Start Position(0,0) and End Position(200,200). i want to move start to end vector using angle. If ...
0
votes
1answer
446 views

Calculate path of laser beam?

Lets say we have a laser beam emitter that has a position and an angle (in a 2D world to simplify things). The laser emitted from that emitter will start at that position, and continue heading in the ...
3
votes
3answers
4k views

Getting the angle between two objects?

I have a set of boxes which create a sort of path, they don't intersect very smoothy and to help that process I'm trying ot find a way to get an angle between them that can make it easier to generate ...
14
votes
8answers
6k views

Comparing angles and working out the difference

I want to compare angles and get an idea of the distance between them. For this application, I'm working in degrees, but it would also work for radians and grads. The problem with angles is that they ...