# \#math

**URL:** https://forums.unrealengine.com/tag/math/230.md

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

---

## [Math expression negative numbers?](https://forums.unrealengine.com/t/math-expression-negative-numbers/463634)

<div class="topic-metadata">

**Author:** [@DDemon](https://forums.unrealengine.com/u/DDemon)\
**Replies:** 3\
**Last updated:** [July 14, 2026, 11:13am UTC](https://forums.unrealengine.com/t/math-expression-negative-numbers/463634 "2026-07-14T11:13:33Z")

</div>

So I used a lot of math and started to place it into math expression and made this simple example, is this supposed to be?

---

## [Wrap (Integer) Blueprint Node](https://forums.unrealengine.com/t/wrap-integer-blueprint-node/2727434)

<div class="topic-metadata">

**Author:** [@xeoncat](https://forums.unrealengine.com/u/xeoncat)\
**Replies:** 0\
**Last updated:** [June 9, 2026, 2:53pm UTC](https://forums.unrealengine.com/t/wrap-integer-blueprint-node/2727434 "2026-06-09T14:53:31Z")

</div>

I’ve submitted a bug report for the Wrap (Integer) node because I think it doesn’t have the expected behavior. My values frequently end up with -1 or +1 than the expected value above or below min and max. Meanwhile here…

---

## [Feature Request: Subtract node shortcut in material editor](https://forums.unrealengine.com/t/feature-request-subtract-node-shortcut-in-material-editor/649705)

<div class="topic-metadata">

**Author:** [@JazzMann121](https://forums.unrealengine.com/u/JazzMann121)\
**Replies:** 4\
**Last updated:** [May 16, 2026, 2:35am UTC](https://forums.unrealengine.com/t/feature-request-subtract-node-shortcut-in-material-editor/649705 "2026-05-16T02:35:31Z")

</div>

There’s a shortcut for all of the basic math functions except subtract. I would imagine that holding “S” with a left click (like the other math functions use “A”, “D” and “M”) would do this but instead spawns a scalar pa…

---

## [division in materials custom node (HLSL) is bad](https://forums.unrealengine.com/t/division-in-materials-custom-node-hlsl-is-bad/2712103)

<div class="topic-metadata">

**Author:** [@BOBtheROSS](https://forums.unrealengine.com/u/BOBtheROSS)\
**Replies:** 0\
**Last updated:** [April 7, 2026, 2:48pm UTC](https://forums.unrealengine.com/t/division-in-materials-custom-node-hlsl-is-bad/2712103 "2026-04-07T14:48:55Z")

</div>

The custom node seems to be worse than the build in division node. Is this expected behaviour? problem: for var1 = 3.0 the HLSL code return var1/trunc(var1); does not return 1.0, but ~0.99999995 (the next lower value…

---

## [Objects far away are clipping](https://forums.unrealengine.com/t/objects-far-away-are-clipping/2703361)

<div class="topic-metadata">

**Author:** [@xx\_pooya\_xx](https://forums.unrealengine.com/u/xx_pooya_xx)\
**Replies:** 13\
**Last updated:** [March 8, 2026, 4:43am UTC](https://forums.unrealengine.com/t/objects-far-away-are-clipping/2703361 "2026-03-08T04:43:50Z")

</div>

So to give a background of the issue, in our VR class, our professor asked us to make a game / experience where you can scale yourself 1000X smaller / bigger relative to the environment. Our team is making a game in thi…

---

## [SetActorScale3D behaving out of place when applying 1:1000 and vice versa scale?](https://forums.unrealengine.com/t/setactorscale3d-behaving-out-of-place-when-applying-1-1000-and-vice-versa-scale/2701170)

<div class="topic-metadata">

**Author:** [@xx\_pooya\_xx](https://forums.unrealengine.com/u/xx_pooya_xx)\
**Replies:** 0\
**Last updated:** [February 20, 2026, 11:41am UTC](https://forums.unrealengine.com/t/setactorscale3d-behaving-out-of-place-when-applying-1-1000-and-vice-versa-scale/2701170 "2026-02-20T11:41:12Z")

</div>

So we are making a game for our final project in our school in VR. The concept is: 1:1000 scale change of player and time. I am scaling up to environment to make the player ‘tiny’. For 1 → 1000, I do SetActorScale3D(Ge…

---

## [Calculation not working when pulling from array.](https://forums.unrealengine.com/t/calculation-not-working-when-pulling-from-array/2695289)

<div class="topic-metadata">

**Author:** [@Bushwookie69](https://forums.unrealengine.com/u/Bushwookie69)\
**Replies:** 5\
**Last updated:** [January 27, 2026, 7:56pm UTC](https://forums.unrealengine.com/t/calculation-not-working-when-pulling-from-array/2695289 "2026-01-27T19:56:00Z")

</div>

So in Img 1 this in on my character so when you lose the game it does this to save your best (highest) time. If you don’t have a higher time it wont save that float to the savegame. In Img 2 this is my Widget that ge…

---

## [Scroll Widget into view question](https://forums.unrealengine.com/t/scroll-widget-into-view-question/2690773)

<div class="topic-metadata">

**Author:** [@Bushwookie69](https://forums.unrealengine.com/u/Bushwookie69)\
**Replies:** 5\
**Last updated:** [January 9, 2026, 7:45pm UTC](https://forums.unrealengine.com/t/scroll-widget-into-view-question/2690773 "2026-01-09T19:45:53Z")

</div>

When i Scroll Down in my controller it sends a message to my BP widget to tell if its up or down scroll. This triggers a Int to be added or subtracted for my scroll box. I start my “Current index of SB" at 0 it goes 0, …

---

## [Need help with BP math.](https://forums.unrealengine.com/t/need-help-with-bp-math/2677282)

<div class="topic-metadata">

**Author:** [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Replies:** 10\
**Last updated:** [November 21, 2025, 7:07pm UTC](https://forums.unrealengine.com/t/need-help-with-bp-math/2677282 "2025-11-21T19:07:49Z")

</div>

Line trace is not firing at right direction, it must simply go by arrow direction, does not do that. And also gravity and rotation is simply must set by line trace hit point’s normal, does not do that either. Came…

---

## [Maths Not adding up-Skips Maths completely ](https://forums.unrealengine.com/t/maths-not-adding-up-skips-maths-completely/2669865)

<div class="topic-metadata">

**Author:** [@gamekillz-62](https://forums.unrealengine.com/u/gamekillz-62)\
**Replies:** 1\
**Last updated:** [October 30, 2025, 3:21am UTC](https://forums.unrealengine.com/t/maths-not-adding-up-skips-maths-completely/2669865 "2025-10-30T03:21:49Z")

</div>

Hey guys i Have a Very simple math node that Seems to not be working, im not the best at math but am fairly sure this is a bug, so i have this Function called from the press of a button, then it checks if {\*Clicking-T…

---

## [Unreal Engine arithmetic](https://forums.unrealengine.com/t/unreal-engine-arithmetic/2668513)

<div class="topic-metadata">

**Author:** [@mattv](https://forums.unrealengine.com/u/mattv)\
**Replies:** 4\
**Last updated:** [October 28, 2025, 8:36am UTC](https://forums.unrealengine.com/t/unreal-engine-arithmetic/2668513 "2025-10-28T08:36:53Z")

</div>

Morning all, I’ve got a pick up system that will take a percentage of coins away from the player if they trigger it .. a little confused on this one though. Forgive me if my math is completely wrong here (not unlike…

---

## [Unreal Engine nonsensical code duplication shenanigans](https://forums.unrealengine.com/t/unreal-engine-nonsensical-code-duplication-shenanigans/2459014)

<div class="topic-metadata">

**Author:** [@OctoberIC](https://forums.unrealengine.com/u/OctoberIC)\
**Replies:** 4\
**Last updated:** [April 16, 2025, 4:46pm UTC](https://forums.unrealengine.com/t/unreal-engine-nonsensical-code-duplication-shenanigans/2459014 "2025-04-16T16:46:12Z")

</div>

Looking in “GenericPlatformMath.h”, just like in so many other places in Unreal Engine’s (8 million lines?) code base, I found pages of the following. My question is, where does this strange (and harmful) practice come …

---

## [Which algorithm is used for spline components in UE4?](https://forums.unrealengine.com/t/which-algorithm-is-used-for-spline-components-in-ue4/337817)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_a49f03e3](https://forums.unrealengine.com/u/anonymous_user_a49f03e3)\
**Replies:** 5\
**Last updated:** [April 14, 2025, 7:05am UTC](https://forums.unrealengine.com/t/which-algorithm-is-used-for-spline-components-in-ue4/337817 "2025-04-14T07:05:07Z")

</div>

In the pursuit of solving my bigger problem with UE4 splines, I decided to do some math computation myself. I quickly realized, that I don’t know which algorithm is actually being used by the engine to draw the splines. …

---

## [Set chances of multiple outputs for input parameter.](https://forums.unrealengine.com/t/set-chances-of-multiple-outputs-for-input-parameter/2398510)

<div class="topic-metadata">

**Author:** [@GreenOk.1](https://forums.unrealengine.com/u/GreenOk.1)\
**Replies:** 3\
**Last updated:** [March 19, 2025, 9:51am UTC](https://forums.unrealengine.com/t/set-chances-of-multiple-outputs-for-input-parameter/2398510 "2025-03-19T09:51:33Z")

</div>

Hello everyone! I got stuck with some maths and it’s implementation in my project, looking forward to hear some advices. I’m currently trying to make a trading system with vendors in my project. Using a slide bar, play…

---

## [Control Rig Backwards solving for sliders](https://forums.unrealengine.com/t/control-rig-backwards-solving-for-sliders/1319519)

<div class="topic-metadata">

**Author:** [@Laharl8971](https://forums.unrealengine.com/u/Laharl8971)\
**Replies:** 2\
**Last updated:** [March 13, 2025, 10:36am UTC](https://forums.unrealengine.com/t/control-rig-backwards-solving-for-sliders/1319519 "2025-03-13T10:36:24Z")

</div>

I Have my fingers on this control rig controlled by sliders. Im currently trying to backwards solve the control rig so I can bake any animation I want onto this rig for adjustments. My current thought process has me …

---

## [Fast Math Nodes cost is more expensive than itself](https://forums.unrealengine.com/t/fast-math-nodes-cost-is-more-expensive-than-itself/2270284)

<div class="topic-metadata">

**Author:** [@turkogenc](https://forums.unrealengine.com/u/turkogenc)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 9:51pm UTC](https://forums.unrealengine.com/t/fast-math-nodes-cost-is-more-expensive-than-itself/2270284 "2025-01-10T21:51:49Z")

</div>

As you can see in the images, i made a reflection cube. I used Arctangent and arccosine. There are fast nodes of these nodes. But when i use these node instructions count are increase. I made this material by a yout…

---

## [Scientific notation for large numbers](https://forums.unrealengine.com/t/scientific-notation-for-large-numbers/2208963)

<div class="topic-metadata">

**Author:** [@Blsports5911](https://forums.unrealengine.com/u/Blsports5911)\
**Replies:** 4\
**Last updated:** [December 30, 2024, 8:50pm UTC](https://forums.unrealengine.com/t/scientific-notation-for-large-numbers/2208963 "2024-12-30T20:50:28Z")

</div>

Good afternoon, I am currently working on creating an idle game. I am having some troubles though when it comes to large numbers. What I am trying to avoid is having numbers like 1,000,000,000,000 display instead have 1…

---

## [Triangle/Box Intersection? UE 5.2+](https://forums.unrealengine.com/t/triangle-box-intersection-ue-5-2/2162966)

<div class="topic-metadata">

**Author:** [@Sweenus987](https://forums.unrealengine.com/u/Sweenus987)\
**Replies:** 1\
**Last updated:** [December 4, 2024, 5:23pm UTC](https://forums.unrealengine.com/t/triangle-box-intersection-ue-5-2/2162966 "2024-12-04T17:23:48Z")

</div>

Does UE 5.2+ have anything built in for AABB/Triangle intersections? It has ones for Line/Box, Line/Plane, Line/Sphere etc. but I need to see if a triangle intersects a box and if a box is inside a triangle too.

---

## [Aim Offset AI not shooting straight](https://forums.unrealengine.com/t/aim-offset-ai-not-shooting-straight/366004)

<div class="topic-metadata">

**Author:** [@RawRamen](https://forums.unrealengine.com/u/RawRamen)\
**Replies:** 4\
**Last updated:** [October 6, 2024, 6:54pm UTC](https://forums.unrealengine.com/t/aim-offset-ai-not-shooting-straight/366004 "2024-10-06T18:54:28Z")

</div>

So i have an ai controlled pawn with a blendspace aim offset and it works pretty well, except that the offset values are not correct, causing the ai most of the time to miss its target; i’m doing something wrong with my …

---

## [Math, Fmath, Kismet math or maybe standard math from c++?](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_49eeb52c](https://forums.unrealengine.com/u/anonymous_user_49eeb52c)\
**Replies:** 3\
**Last updated:** [September 13, 2024, 8:05pm UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778 "2024-09-13T20:05:53Z")

</div>

Hi, I encounter a problem with choosing the right math library, just for random a couple of ints… it’s sounds funny, but I really feel confused. What’s the diference between UE4 Math llibrary, FMath library and randomiz…

---

## [Map motion controller rotation onto object for laser pointer type manipulation (rotator math)](https://forums.unrealengine.com/t/map-motion-controller-rotation-onto-object-for-laser-pointer-type-manipulation-rotator-math/500024)

<div class="topic-metadata">

**Author:** [@2oftware](https://forums.unrealengine.com/u/2oftware)\
**Replies:** 1\
**Last updated:** [September 3, 2024, 9:59am UTC](https://forums.unrealengine.com/t/map-motion-controller-rotation-onto-object-for-laser-pointer-type-manipulation-rotator-math/500024 "2024-09-03T09:59:35Z")

</div>

Hi, everyone. I’m trying to rotate an object using motion controller rotation. It works from one direction, but if I move to the side or the back of the object, it doesn’t rotate as expected. I have bumped into thi…

---

## [How do you convert 3D coordinates to 2D/UV coordinates?](https://forums.unrealengine.com/t/how-do-you-convert-3d-coordinates-to-2d-uv-coordinates/1984597)

<div class="topic-metadata">

**Author:** [@Cestarian](https://forums.unrealengine.com/u/Cestarian)\
**Replies:** 5\
**Last updated:** [August 21, 2024, 4:05pm UTC](https://forums.unrealengine.com/t/how-do-you-convert-3d-coordinates-to-2d-uv-coordinates/1984597 "2024-08-21T16:05:57Z")

</div>

I have some code that allows me to paint on meshes by unwrapping their uv and using it to read coordinates. My goal is to instead of just painting a random color in the shape of a sphere or box mask, I want to be …

---

## [Carry Object offset from MoCon Hand](https://forums.unrealengine.com/t/carry-object-offset-from-mocon-hand/1914115)

<div class="topic-metadata">

**Author:** [@LogicalRaelyn](https://forums.unrealengine.com/u/LogicalRaelyn)\
**Replies:** 0\
**Last updated:** [June 23, 2024, 10:15pm UTC](https://forums.unrealengine.com/t/carry-object-offset-from-mocon-hand/1914115 "2024-06-23T22:15:32Z")

</div>

Hello, I am trying to implement free-carry of objects w/ a motion controlled hand, with some objects begin “equippable” or held in the hand at a relative offset location and rotation from the hand. The hand has a carry…

---

## [How to get perpendicular angle to vector?](https://forums.unrealengine.com/t/how-to-get-perpendicular-angle-to-vector/489824)

<div class="topic-metadata">

**Author:** [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Replies:** 4\
**Last updated:** [May 18, 2024, 3:29pm UTC](https://forums.unrealengine.com/t/how-to-get-perpendicular-angle-to-vector/489824 "2024-05-18T15:29:58Z")

</div>

Is there a way to calculate the perpendicular angle to some vector? As a rotation axis, it will be Z

---

## [Line trace lock on](https://forums.unrealengine.com/t/line-trace-lock-on/428244)

<div class="topic-metadata">

**Author:** [@live4film](https://forums.unrealengine.com/u/live4film)\
**Replies:** 6\
**Last updated:** [May 5, 2024, 5:39am UTC](https://forums.unrealengine.com/t/line-trace-lock-on/428244 "2024-05-05T05:39:30Z")

</div>

Is there a way to get a line trace to lock onto a target. I have a turret that I control with a line trace attached, I want to be able to control the sight, but once my target lines up with the crosshairs (line trace) t…

---

## [Dot Product is the coolest math in shaders (article)](https://forums.unrealengine.com/t/dot-product-is-the-coolest-math-in-shaders-article/1813601)

<div class="topic-metadata">

**Author:** [@Adder1812](https://forums.unrealengine.com/u/Adder1812)\
**Replies:** 2\
**Last updated:** [April 21, 2024, 9:11am UTC](https://forums.unrealengine.com/t/dot-product-is-the-coolest-math-in-shaders-article/1813601 "2024-04-21T09:11:50Z")

</div>

Hey! I thought I’d share with you an article I wrote about the usefulness of the Dot Product function in materials. I hope you like it!

---

## [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…

---

## [Construction Script causes actor to only move up](https://forums.unrealengine.com/t/construction-script-causes-actor-to-only-move-up/1748405)

<div class="topic-metadata">

**Author:** [@sweeetjd](https://forums.unrealengine.com/u/sweeetjd)\
**Replies:** 1\
**Last updated:** [March 12, 2024, 11:16pm UTC](https://forums.unrealengine.com/t/construction-script-causes-actor-to-only-move-up/1748405 "2024-03-12T23:16:37Z")

</div>

In my construction script, I need to set an object onto a custom grid, which is done by the function Location to Grid, and then move that location up 46 on the Z axis. For some reason, this makes it so that when I move a…

---

## [I want 2 vectors representing the bounds of a mesh but when I rotate the actor, the bounds are wrong when the object rotates](https://forums.unrealengine.com/t/i-want-2-vectors-representing-the-bounds-of-a-mesh-but-when-i-rotate-the-actor-the-bounds-are-wrong-when-the-object-rotates/361687)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_00981c62](https://forums.unrealengine.com/u/anonymous_user_00981c62)\
**Replies:** 1\
**Last updated:** [March 10, 2024, 3:38pm UTC](https://forums.unrealengine.com/t/i-want-2-vectors-representing-the-bounds-of-a-mesh-but-when-i-rotate-the-actor-the-bounds-are-wrong-when-the-object-rotates/361687 "2024-03-10T15:38:32Z")

</div>

I’m currently trying to make a board, where I can drag objects along a flat plane. I also want this actor modular, so I’m allowing user’s to replace the existing mesh and use another. I get the bounds of the componen…

---

## [Calculate left or right of wall](https://forums.unrealengine.com/t/calculate-left-or-right-of-wall/475471)

<div class="topic-metadata">

**Author:** [@NorthWeapon](https://forums.unrealengine.com/u/NorthWeapon)\
**Replies:** 3\
**Last updated:** [February 10, 2024, 8:12am UTC](https://forums.unrealengine.com/t/calculate-left-or-right-of-wall/475471 "2024-02-10T08:12:51Z")

</div>

May not be 100% precise example but see if this gets you any closer:

[Next page](https://forums.unrealengine.com/tag/math/230.md?match_all_tags=true&page=1&tags%5B%5D=math)
