Questions tagged [direction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
2answers
2k views

How do I set angular velocity/torque so that it's pointing to velocity/direction?

Right now, when I spawn a shootable object, it goes like this: Because I just set it's angle to this: ...
0
votes
3answers
2k views

How can I calculate force and acceleration?

I have problem of calculating the movement of the object. At the moment, I have a vectors calculated from the center of the screen minus the position of the object. ...
8
votes
2answers
7k views

How can I draw a line of certain length and direction?

I want to create a line of certain length and direction. What I mean by this is drawing a line from Point A to Point B. Normally in Unity C# to draw a line from Point A to Point B is simply: ...
1
vote
2answers
3k 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 ...
0
votes
1answer
104 views

Bullet direction incorrect around sphere

Here is a little background on how my game objects are set up, and how the rotations and firing bullets work. I am working on this game in Unity. I have two game objects that orbit a sphere (for ...
0
votes
1answer
202 views

Make object face another object on a sphere

I have a game I'm working on in Unity where there are two objects on a sphere at random locations (and random rotations). I want one of the objects to always rotate so that if it were to fire a bullet ...