Vector projection to other vector

  • Context:
  • Thread starter Thread starter twoski
  • Start date Start date
  • Tags Tags
    Projection Vector
Click For Summary

Discussion Overview

The discussion centers around the mathematical concept of projecting one vector onto another in a three-dimensional space, specifically focusing on the projection of Vector A onto Vector B using a specified direction represented by a normalized vector C. Participants are exploring the mathematical formulation and potential coding implementation of this projection in the context of Unity.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant describes the goal of projecting Vector A onto Vector B in the direction of a specified normal (Vector C) and expresses the need to create a custom projection function in Unity.
  • Another participant seeks clarification on the mathematical intent, questioning whether the projection of A onto B followed by a projection onto C is the same as directly projecting A onto C.
  • A third participant suggests that projecting one vector onto another can be accomplished using the vector dot product, providing a link to a relevant resource for further reading.

Areas of Agreement / Disagreement

The discussion reflects some confusion regarding the specific mathematical operations involved in the projection process, with no clear consensus reached on the correct approach or interpretation of the projection in the given context.

Contextual Notes

Participants have not fully resolved the assumptions regarding the relationships between the vectors A, B, and C, nor the implications of projecting in different directions. The mathematical steps involved in the projection process remain unclear.

twoski
Messages
177
Reaction score
2
Let's say i have 2 arbitrary vectors in a 3d space. I want to project Vector A to Vector B using a specified normal.

edit: better image

PQh2BdO.png


A is green, B is red, C is red arrow. Blue is result.

In this case, i want to project green vector to red vector in the red direction. This would give me the blue vector as a result.

I'm working in unity and they have a projection function, but it doesn't operate how i want it to... So i guess i need to make my own.

Here is the projection function they do have: https://docs.unity3d.com/ScriptReference/Vector3.Project.html
 

Attachments

  • nlUJHEW.png
    nlUJHEW.png
    5.9 KB · Views: 426
  • PQh2BdO.png
    PQh2BdO.png
    1.5 KB · Views: 817
Last edited:
  • Like
Likes   Reactions: Delta2
Technology news on Phys.org
The drawing is really bad. Can you try to explain what are you trying to do mathematically ?

As I understand you have three vectors, ##\vec {A},\vec {B},\vec {C}## you want to project ##\vec {A}## on ##\vec {B}##. on direction ##\vec {C}## ?

Isnt it the same as A projection on C ? Since A projection on B gives you a vector on B direction and then you want to project it again on C ?

If this is true I can help you with the code part. I guess at least for the math part.
 
Sorry that's not a great picture. A and B are 2 vectors in a 3d Space. I want to project Vector B to Vector A in a given direction, ie. Normalized Vector C.
 
I guess I ll not be able to help ..sorry
 

Similar threads

Replies
53
Views
5K
Replies
26
Views
2K
  • · Replies 66 ·
3
Replies
66
Views
6K
  • · Replies 146 ·
5
Replies
146
Views
11K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
13
Views
4K