Questions tagged [aiming]
Taking focus on a target, often to shoot it, and even more often in the head.
52 questions
0 votes
0 answers
88 views
How to Implement Ray Casting and Aim Assist Scaling in UE5 Using C++ for FPS Mechanics?
I'm developing an FPS shooter in Unreal Engine 5 and currently working on the aiming mechanics for keyboard and mouse (KBM). I want to implement an aim assist system that uses ray casting to detect ...
0 votes
0 answers
27 views
Rotate the parent object so that the child object points to the cursor 2D [duplicate]
I have an arm that has a pivot point on it. I want to rotate the arm so that the barrel of the gun points to the cursor. How do I calculate the angle of rotation for the arm? I'm not very good at math ...
0 votes
1 answer
796 views
Intercept an accelerating object with a constant velocity projectile
I want to calculate the time that it takes to intercept a moving target "plane" with a projectile. For example I have two 3 dimensional vectors (2 locations in 3D space). ...
0 votes
2 answers
360 views
2D - How to make a gun muzzle aim at the mouse when the rotation pivot isn't on the muzzle?
I'm making a simple 2D shooter game in pygame and I've come across an issue when making the character aim its gun at the mouse. To make the gun aim up and down, I've set it so that the gun uses the ...
0 votes
1 answer
136 views
Rotating player around planet causes drift in gun aiming at mouse
I have a bug with the rotation of a gun object that follows the mouse position. It has issues when the parent object player rotates. Example: The player has a gravity script to keep them aligned with ...
-1 votes
1 answer
99 views
Run n' Gun game: Fixating the gun's angle
I am trying to have the gun stick to facing the left or right when the player isn't pressing any of the arrow keys. For instance, if the player is aiming diagonally up-left, then when the player lets ...
1 vote
0 answers
163 views
How to calculate rotations for an object with scaling transformations?
I am working on implementing scaling transformations into a game engine (C++), which previously assumed only translations and rotations. Visually, the scaling works, but a lot of the game logic ...
0 votes
0 answers
118 views
Leading a target with edge casting
I am trying to write a movement prediction code. I have found the quadratic method with these topics: [1]: How to calculate shot angle and velocity to hit a moving target? [2]: http://...