This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

I don't know how to decide if my point is on the left or right side of another object.
My first thought was to check if x-axis of object1 is bigger or smaller than object2's, but if my objects rotate ...

I'm really curious about why a lot of people and game engines use Vector2 as its coordinate system instead of the traditional x and y value.
Is there any benefit to this?
I feel like it's just slow ...

I only have the object's position, the player position, and the vector representing the player's view, and I have the FoV (120 degrees horizontal/60 on each side, and 60 degrees vertical/30 on each ...

I'm making a chess game, where you simply drag and drop a pawn on the board with respect to each player's turn.
when it comes to dropping a pawn we need to validate weather the move is allowed. for ...

They say an affine transformation preserves points, lines, parallel lines etc. I can see this if I think in terms of translation [Is there any other affine transformation you can give as an example, ...

I am trying to setup a virtual ping pong table, and am getting a little stuck in trying to understand how to do 3D vector math and render it in 2D.
So far, my plan is for the ball: X = up/down, Y = ...

I'm currently working on turret aiming code. If I can't hit the center of the object (due to an obstacle), I want to see if I can hit any of the object. To do this i'll get it's bounds, and check in ...

I'm drawing a health bar on top of each player. I transform 3d position to 2d. I would like to draw it smaller when distance increases. Any simple math for that? Let's say bar width is 30 and height ...

How do we rotate the camera around x axis 360 degrees, without having to flip the axis, meaning without having the strange flip after we go over +-90 degrees on x axis? Mine behaves exactly the same ...

I am importing my animation keyframe joint data from Blender to my game engine. The joint data is a set of 4D matrices. Things are looking good except a remaining issue where the animation is facing ...

I'm making a skating game and I'm having trouble figuring out how to snap the player onto grinds and rails in between multiple points. My plan was to snap the player onto a point in between the two ...

In a tile-based 2D RPG, a character is supposed to walk into all eight directions.
However, if we blindly tell the player to move in the direction (1, 1), he will be around 41% (√2-fold) faster. Thus,...

I need to find the angle of rotation from a bullet traveling from point A to point B, like in my attached diagram. I tried searching, but I got a little lost in which exact formula to use.
I want to ...

How can I check if a player has traced a closed vector shape from an arbitrary starting point all the way around to the beginning?
Setup
Given are the vector points A through E, which form a closed ...

If I have two objects, Person A and Person B, and I want to know if Person B is facing the same direction as Person A; once I have the vectors, how do I use the normalized vector to show direction?
...

I have a 3D model of a turret that con rotate around the Y-axis. This turret has a cannon that is significantly off the center of the object. I want the cannon, not the turret, to aim at a specified ...

I'm trying to detect Collision between autonomous moving objects and steer direction if collision is detected. so far I've been following a tutorial and I'm having a hard time to fully understand how ...

I need my entity to go from point A to point B with a given launch angle over a given time.
I've been able to figure out the initial velocity without the constraint of the launch angle, but I can't ...