Offset Vector with Distance, Pitch & Yaw

Given:

  • Origin Point (x,y,z)
  • Pitch
  • Yaw
  • Offset Distance

Use:

sinθ = oppositehypotenuse
cosθ = adjacenthypotenuse

Solution:

Solution Visualized
Simplified Visualization

Finding X:

Adj = Hypcosθ; θ = Yaw
Hyp = Distcosθ; θ = Pitch
x = (DistcosPitch)cosYaw

Finding Y:

Opp = Hypsinθ; θ = Yaw
Hyp = Distcosθ; θ = Pitch
y = (DistcosPitch)sinYaw

Finding Z:

Opp = Hypsinθ; θ = Pitch
z = DistsinPitch

Implementing to Unreal:

Uses:

  • Place actor at a certain distance from camera
  • Find a point from a bone socket

One thought on “Offset Vector with Distance, Pitch & Yaw

Leave a reply to [UE4] Hand Reference Based FPS/TPS Weapon Animation – Portfolio: NGG Cancel reply