# \#vector-math

**URL:** https://forums.unrealengine.com/tag/vector-math/5007.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [Working out the area of a spline loop, do I need to use shoelace formula and 2D projection?](https://forums.unrealengine.com/t/working-out-the-area-of-a-spline-loop-do-i-need-to-use-shoelace-formula-and-2d-projection/2469943)

<div class="topic-metadata">

**Author:** [@Anthony\_Attwood](https://forums.unrealengine.com/u/Anthony_Attwood)\
**Replies:** 4\
**Last updated:** [April 24, 2025, 6:26pm UTC](https://forums.unrealengine.com/t/working-out-the-area-of-a-spline-loop-do-i-need-to-use-shoelace-formula-and-2d-projection/2469943 "2025-04-24T18:26:38Z")

</div>

Quick question, I’m trying to work out the area of a closed spline loop in 3D space. I’m coming across all kinds of complex methods for working out areas of n-sided polygons in 3D space and using the shoelace method. Is …

---

## [Rotate component in it's local space toward a point in world](https://forums.unrealengine.com/t/rotate-component-in-its-local-space-toward-a-point-in-world/1907388)

<div class="topic-metadata">

**Author:** [@Chaotic\_Ray](https://forums.unrealengine.com/u/Chaotic_Ray)\
**Replies:** 18\
**Last updated:** [June 18, 2024, 12:25pm UTC](https://forums.unrealengine.com/t/rotate-component-in-its-local-space-toward-a-point-in-world/1907388 "2024-06-18T12:25:33Z")

</div>

Hi. I apologize for the hackneyed question, but I couldn’t find the answer on the forum. I’m making a tank. Simple hierarchy: Body → tower → cannon. A little stuck on the aiming system. I’m doing a linetrace from th…

---

## [Line Trace By Channel Perpendicular from character](https://forums.unrealengine.com/t/line-trace-by-channel-perpendicular-from-character/1826456)

<div class="topic-metadata">

**Author:** [@NadaCo38](https://forums.unrealengine.com/u/NadaCo38)\
**Replies:** 2\
**Last updated:** [May 1, 2024, 8:20pm UTC](https://forums.unrealengine.com/t/line-trace-by-channel-perpendicular-from-character/1826456 "2024-05-01T20:20:22Z")

</div>

Hello, I’m having trouble making a line perpendicular to my character. A picture is worth 1000 words . So I have no problem creating a straight line from my character. Now I’d like another line at the end of this li…

---

## [Best way to rotate actors from a right-handed notation (avoiding FRotator locking angles). Plus: Rotator or quaternions?](https://forums.unrealengine.com/t/best-way-to-rotate-actors-from-a-right-handed-notation-avoiding-frotator-locking-angles-plus-rotator-or-quaternions/1771368)

<div class="topic-metadata">

**Author:** [@scalabro12](https://forums.unrealengine.com/u/scalabro12)\
**Replies:** 0\
**Last updated:** [March 25, 2024, 12:31pm UTC](https://forums.unrealengine.com/t/best-way-to-rotate-actors-from-a-right-handed-notation-avoiding-frotator-locking-angles-plus-rotator-or-quaternions/1771368 "2024-03-25T12:31:10Z")

</div>

Hey, I am working on a simulation of a satellite around a target, to which the chaser satellite is referenced as a child actor. Apart from that, my simulation uses Euler Angles of a right-handed body reference frame to r…

---

## [Blueprint Fvector2D(20000, 20000)/2 = 0???](https://forums.unrealengine.com/t/blueprint-fvector2d-20000-20000-2-0/1586802)

<div class="topic-metadata">

**Author:** [@SimplestWay](https://forums.unrealengine.com/u/SimplestWay)\
**Replies:** 2\
**Last updated:** [January 4, 2024, 7:59am UTC](https://forums.unrealengine.com/t/blueprint-fvector2d-20000-20000-2-0/1586802 "2024-01-04T07:59:33Z")

</div>

I don’t know why, another unreal bug, I can’t reproduct in my test project but the print value is 20000/2=0 lol

---

## [Find vertex location](https://forums.unrealengine.com/t/find-vertex-location/1367797)

<div class="topic-metadata">

**Author:** [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Replies:** 1\
**Last updated:** [November 9, 2023, 9:14am UTC](https://forums.unrealengine.com/t/find-vertex-location/1367797 "2023-11-09T09:14:15Z")

</div>

Hi, I am trying to find the “middle point” position in a deformed mesh that kind of looks like a pipe/cord. (The position between Vertex and Opposite - see drawing) I am thinking that finding two points opposite each o…

---

## [How do you create a relative offset transform that takes the original's rotation into account (blueprint)?](https://forums.unrealengine.com/t/how-do-you-create-a-relative-offset-transform-that-takes-the-originals-rotation-into-account-blueprint/1234246)

<div class="topic-metadata">

**Author:** [@Delta6](https://forums.unrealengine.com/u/Delta6)\
**Replies:** 2\
**Last updated:** [July 20, 2023, 8:54pm UTC](https://forums.unrealengine.com/t/how-do-you-create-a-relative-offset-transform-that-takes-the-originals-rotation-into-account-blueprint/1234246 "2023-07-20T20:54:52Z")

</div>

I’m trying to create a blueprint that takes an existing transform and creates a new transform offset by a set amount relative to the original. I know I can get this working with a custom C++ function and some math but I’…

---

## [Vector Math in Unreal](https://forums.unrealengine.com/t/vector-math-in-unreal/1219192)

<div class="topic-metadata">

**Author:** [@SeldinG](https://forums.unrealengine.com/u/SeldinG)\
**Replies:** 4\
**Last updated:** [July 6, 2023, 1:27am UTC](https://forums.unrealengine.com/t/vector-math-in-unreal/1219192 "2023-07-06T01:27:52Z")

</div>

Any math gurus out there? It’s been a while since Calculus/Trig and even longer since Algebra. Since I deal with vectors all the time in Unreal, I thought it’d be a good idea to spend a day doing some by hand. In doing s…

---

## [Random Point on BoundingBox Perimeter](https://forums.unrealengine.com/t/random-point-on-boundingbox-perimeter/683416)

<div class="topic-metadata">

**Author:** [@markcham](https://forums.unrealengine.com/u/markcham)\
**Replies:** 16\
**Last updated:** [April 19, 2023, 6:27am UTC](https://forums.unrealengine.com/t/random-point-on-boundingbox-perimeter/683416 "2023-04-19T06:27:15Z")

</div>

Kismet has a function for random point in bounding box, but I’m looking for a random point along a bounding box perimeter. I have a fixed location for the bounding box origin and have access to the box extent. Thanks, …

---

## [Can someone explain how this math works? Point A to B velocity calculation.](https://forums.unrealengine.com/t/can-someone-explain-how-this-math-works-point-a-to-b-velocity-calculation/857518)

<div class="topic-metadata">

**Author:** [@Brazen\_Aden](https://forums.unrealengine.com/u/Brazen_Aden)\
**Replies:** 4\
**Last updated:** [April 8, 2023, 6:39am UTC](https://forums.unrealengine.com/t/can-someone-explain-how-this-math-works-point-a-to-b-velocity-calculation/857518 "2023-04-08T06:39:42Z")

</div>

I was looking at math to try and figure out how to get the velocity to match the location and I stumbled upon a formula I had no clue how to convert. It seemed it was for a float velocity. Calculate force required to mo…

---

## [Forward Vector from normal flipping SOLVED! (sorry don't know how to mark it as such officially)](https://forums.unrealengine.com/t/forward-vector-from-normal-flipping-solved-sorry-dont-know-how-to-mark-it-as-such-officially/773832)

<div class="topic-metadata">

**Author:** [@RobertoCosta\_Dev](https://forums.unrealengine.com/u/RobertoCosta_Dev)\
**Replies:** 5\
**Last updated:** [February 19, 2023, 5:28am UTC](https://forums.unrealengine.com/t/forward-vector-from-normal-flipping-solved-sorry-dont-know-how-to-mark-it-as-such-officially/773832 "2023-02-19T05:28:51Z")

</div>

SOLVED! (sorry don’t know how to mark it as such officially) Long story short, omni-directional gravity and the requirement to rotate in line with that. Issue is when the sign of an element of a normal (used to calculat…

---

## [Get global/world Vector-Axes](https://forums.unrealengine.com/t/get-global-world-vector-axes/742843)

<div class="topic-metadata">

**Author:** [@Maderschaden](https://forums.unrealengine.com/u/Maderschaden)\
**Replies:** 2\
**Last updated:** [January 5, 2023, 7:33pm UTC](https://forums.unrealengine.com/t/get-global-world-vector-axes/742843 "2023-01-05T19:33:29Z")

</div>

How do I get the global vectors corresponding to the world axes. My problem is that sometimes my camera is tilted in game so the up/right vectors would not point straight up/right, therefore I would like to use the world…

---

## [Convert seconds into Play Rate](https://forums.unrealengine.com/t/convert-seconds-into-play-rate/688230)

<div class="topic-metadata">

**Author:** [@sweeetjd](https://forums.unrealengine.com/u/sweeetjd)\
**Replies:** 2\
**Last updated:** [November 16, 2022, 8:51pm UTC](https://forums.unrealengine.com/t/convert-seconds-into-play-rate/688230 "2022-11-16T20:51:04Z")

</div>

I have a timeline that lasts one second. I would like to be able to play back this timeline at different speeds (lasting 2 seconds, 5 seconds, etc), but I don’t know how to convert the total length of time it should play…

---

## [Line intersection fails because of float precision?](https://forums.unrealengine.com/t/line-intersection-fails-because-of-float-precision/684829)

<div class="topic-metadata">

**Author:** [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Replies:** 1\
**Last updated:** [November 6, 2022, 1:26am UTC](https://forums.unrealengine.com/t/line-intersection-fails-because-of-float-precision/684829 "2022-11-06T01:26:56Z")

</div>

FMath::SegmentIntersection2D fails only when two vectors are directed at eachother. This might be a problem with float precision, as the most minimal difference in position / direction would cause an intersection to fai…

---

## [Random Unit Vector In 2 Directions](https://forums.unrealengine.com/t/random-unit-vector-in-2-directions/682918)

<div class="topic-metadata">

**Author:** [@markcham](https://forums.unrealengine.com/u/markcham)\
**Replies:** 1\
**Last updated:** [November 3, 2022, 12:39am UTC](https://forums.unrealengine.com/t/random-unit-vector-in-2-directions/682918 "2022-11-03T00:39:48Z")

</div>

I have a relatively simple question, but I’m really rusty on vector math. I have a starting location (vector). I want to spawn something a fixed length away from the location, along only the YZ plane. If it could be in …

---

## [Math in Delaunay triangulation algorithm, too many triangles appearing](https://forums.unrealengine.com/t/math-in-delaunay-triangulation-algorithm-too-many-triangles-appearing/677429)

<div class="topic-metadata">

**Author:** [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Replies:** 3\
**Last updated:** [October 26, 2022, 5:52pm UTC](https://forums.unrealengine.com/t/math-in-delaunay-triangulation-algorithm-too-many-triangles-appearing/677429 "2022-10-26T17:52:50Z")

</div>

Sadly I am not that good with math and I am working on a Delaunay triangulation of a 2D point field. So far I have the field and “points” are being triangulated. In the example 79 triangles were calculated for 19 points…
