Questions tagged [vector]
A mathematical concept that can be used to express position, direction or velocity and which can simplify or outright trivialise spatial problems.
748 questions
2
votes
2
answers
114
views
Pseudo-3D Parallax Shifting
everyone. I am working on a game that relies pretty substantially on "faking" 3D by using different parallaxing and polygonal transform techniques. In a current example, I am working on a ...
1
vote
1
answer
99
views
Two Point Alignment Transformations
I'm trying to determine the transformation steps (position, scale, rotation) needed to be applied to an object so that two points, locally positioned in that object, line up with two world space ...
1
vote
1
answer
547
views
Given two points (A and B), how can I obtain a point a set distance along the line between them?
Let's say I have position A, that is (0,0) and Position B that is (10,5).
Now let's say I know that position C is 5 units' distance from position A in direction to Position B.
Provided that the ...
0
votes
1
answer
72
views
Have enemy move toward player when spawned
Have an basic enemy prefab that when spawned, I would like it to lock to player and move toward them, with smooth rotation. However, as you can see in this video, the enemy initially moves away from ...
3
votes
6
answers
2k
views
How can I rotate a 16-bit signed integer vector?
I am trying to rotate a vector made of two signed 16-bit coordinates (-32768 to 32767). Using a LUT for sin/cos, I can use the standard method for rotating a vector:
...
0
votes
1
answer
90
views
Changing The Axis That Vector3.Slerp's Arc Happens On
I am using Vector3.Slerp to move a boomerang from the player to a target in an arc, and then back to the player.
It's currently working, but not the way that I want it to.
My issue is that I would ...
0
votes
1
answer
70
views
Problem with 2D projection
I have a green circle:
Inside the circle, the white frame moves to wherever P, the projection of the targets 3D position into a 2D point, is.
However, outside the circle, the frame will move to the ...
0
votes
1
answer
148
views
Rotate vector by quaternion different formulas
I was implementing the rotation of a 3D vector by a quaternion, implementing the formula that I've found in this thread.
To testing my function, I've rotated some vectors by using MATLAB, in ...
0
votes
0
answers
58
views
Fast way to compare a large set of positions, rotations, velocities, etc. during runtime (possibly every frame)
The Goal
I'm working on a vr gesture recognition system. Normally these systems are dependent on "drawn" gestures, but I want something that compares position, rotation, velocity, angular ...
0
votes
1
answer
129
views
Object collision and vector reflection for complex polygons?
I am currently creating an environment to train aim-bot AI's for my game. It is a 2d world made of complex polygons, and the goal is to have the AI's shoot ricocheting bullets. Using a ray-casting ...
0
votes
0
answers
387
views
Suspension vector direction of a raycast vehicle
I'm working on a raycast-based vehicle in a 3D world using a physics engine. It's basically a chassis object that contains a transform (translation, rotation, scale), a dynamic rigid body (with mass, ...
0
votes
1
answer
163
views
How to tell when calculating an Intercept Point between two moving objects, when it will never intercept?
I'm not a maths person and the formulas you see on maths type questions/answer with all the symbols is completely beyond me - I'm sorry. However I had help about 18 months ago to turn a provided ...
1
vote
1
answer
97
views
How to calculate rotation needed to cancel out perspective shift
I have a direction vector that's pointing to (0,0,1) in local object space. How can I calculate rotation needed to rotate it on Y axis so that from camera's point of view it would look as if it's ...
2
votes
0
answers
105
views
Calculate Up Vector of Object on Surface Given Points and Normals
Context
I want to find the up vector an object would have if it were leaning on a surface, given a large amount of points on that surface and their associated surface normals (i.e., an equation that ...
1
vote
2
answers
241
views
Calculate path segments size
I have a problem more closely described on a picture below.
The idea is that I have my agent in point A and I want to get to the point B. The problem is, that agents rotation towards point B is alpha ...