Questions tagged [direction]

The tag has no usage guidance.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
60 views

How to mirror a vector through some other vector?

I have a player's direction (playerDirection). I want to fire two bullets, one rotated by -30f, and one by 30f, so it looks like this: Blue line is the ...
1
vote
2answers
2k views

How to rotate a local position offset based on a direction vector?

I'm trying to fire three raycasts in the direction of movement, from offset starting points. I'm having trouble calculating the start positions of the rays based on the direction. As you can see in ...
1
vote
0answers
371 views

How can I add two Vector3 directions together?

I have a direction to my target object, which is in a Vector3 format. I want cast a number of rays, as offsets from this initial direction. X is the object. D is the direction the player needs to ...
1
vote
0answers
2k views

How to translate a direction on the screen to 3D space?

EDIT: Alright, I've figured out what's wrong. I'm calculating the direction vector properly with the below code: ...
0
votes
1answer
332 views

Change sprite angle on sloping ground

I have a problem here with GameMaker built-in physics environment.My player is designed to be on a skateboard. I want my player to rotate its sprite, according to the kind of fixture(up or down slopes)...
-1
votes
2answers
130 views

Movement based on direction of car?

I'm currently making a simple racing game in libGDX. I am stuck on figuring out how to move my car object based on its direction. So far I have a class PlayerCar.java as shown below: ...
-2
votes
2answers
555 views

In XNA, how do I make a sprite move towards another?

I am making a shoot-em-up with a player-controlled sprite with a gun: I have most of the game working, but I have gotten to the point where I need to load in the enemy characters and make them move ...