Linked Questions

13
votes
2answers
15k views

How do I generate projectiles toward the mouse pointer? [duplicate]

I'm making a top-down space shooter where the player controls a ship and can aim and shoot using the mouse cursor. How can I fire bullets from the ship at the angle from the ship to the mouse cursor?
2
votes
3answers
525 views

Create quaternion based on where a unit is hit (shield effect as in Starcraft 2) [duplicate]

I'd like to implement a shield effect like that done for Protoss units in Starcraft 2. I'm guessing that the technique involved uses a partial sphere that is rotated to reflect where a unit is hit. ...
1
vote
1answer
1k views

Rotating an object to point towards the mouse [duplicate]

I'm using slick2d for this process and trying to rotate a minigun to face the mouse. My problem is that the minigun in my game is actually rotating but no towards the mouse at all! Also, the minigun ...
0
votes
4answers
255 views

How much to modify yaw? XNA 4.0 [duplicate]

Heres a picture that explains better than my words can For rotating an object I'm using quaternions. CreateFromAxisAngle(vector3.Right,yaw) Maybe this isn't how I should be doing it but I also ...
-1
votes
2answers
227 views

3D turret tracking in XNA 4.0 [duplicate]

I've beeen going through Reimer's flightsim tutorial and wanted to expand it by adding anti air turrets shooting at the ship. Im still new to programming in c# and xna and also a bit horrible in maths ...
0
votes
0answers
148 views

Keep 3d model facing the camera at all angles [duplicate]

I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this: ...
4
votes
3answers
3k views

How do I find the angle required to point to another object?

I am making an air combat game, where you can fly a ship in a 3D space. There is an opponent that flies around as well. When the opponent is not on screen, I want to display an arrow pointing in the ...
2
votes
2answers
3k views

Problem using glm::lookat

I am trying to rotate a sprite so it is always facing a 3D camera. Object ...
3
votes
1answer
3k views

Rotating 3d plane to XY plane

I have a triangle in 3d space and would like to create a grid over the triangle, such as in the image below. The purpose of this is to store information about each block of the grid. In order to ...
0
votes
2answers
3k views

Aiming direction using mouse

I'm using the following code to rotate my object using mouse, for aiming direction. The only problem with this is that it only rotates between 0 to 180 and not full 360 degrees. Can any help me locate ...
3
votes
2answers
767 views

Quaternion understanding

I have some understanding problem concerning quaternions. In order to have my world object rotate in the correct way, I need to invert their quaternion rotation while refreshing the object world ...
4
votes
1answer
1k views

How to orient hands(or spine) to always look at some target?

I am building an FPS game in Unity 3D everything was going cool but when I tried to implement aiming for the rifle everything just broke. 1): I have an IK setup which triggers when you equip weapon, ...
1
vote
2answers
588 views

How can I orient a projectile along its flight path?

I have a projectile that is moving around the world (in a ballistics trajectory right now). I am currently keeping track of its position and velocity. I want to draw it oriented to its velocity, so ...