# \#raycasting

**URL:** https://forums.unrealengine.com/tag/raycasting/10092.md

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

---

## [3D ray cast and pathfinding in pure Verse](https://forums.unrealengine.com/t/3d-ray-cast-and-pathfinding-in-pure-verse/1237409)

<div class="topic-metadata">

**Author:** [@eternalme](https://forums.unrealengine.com/u/eternalme)\
**Replies:** 7\
**Last updated:** [September 10, 2025, 5:55pm UTC](https://forums.unrealengine.com/t/3d-ray-cast-and-pathfinding-in-pure-verse/1237409 "2025-09-10T17:55:36Z")

</div>

Here and there weekends project. For now uses box only custom colliders (3 in the middle). The red and green lines is visualization of the collision structure (octree). Yellow is the found path

---

## [Problem with Line Trace/Sphere Trace Fires in All Clients??](https://forums.unrealengine.com/t/problem-with-line-trace-sphere-trace-fires-in-all-clients/2311700)

<div class="topic-metadata">

**Author:** [@RAT\_Official](https://forums.unrealengine.com/u/RAT_Official)\
**Replies:** 1\
**Last updated:** [January 31, 2025, 12:54pm UTC](https://forums.unrealengine.com/t/problem-with-line-trace-sphere-trace-fires-in-all-clients/2311700 "2025-01-31T12:54:39Z")

</div>

Even though, i am running Custom Event “Run on owning Client”… it somehow runs on both other clients and server Somehow, other clients interact with other clients?? i mean in a way : Server : Works normal, only …

---

## [PCG project points onto an upright surface (eg. bullet holes)](https://forums.unrealengine.com/t/pcg-project-points-onto-an-upright-surface-eg-bullet-holes/1347193)

<div class="topic-metadata">

**Author:** [@matijaerceg](https://forums.unrealengine.com/u/matijaerceg)\
**Replies:** 0\
**Last updated:** [October 27, 2023, 12:23am UTC](https://forums.unrealengine.com/t/pcg-project-points-onto-an-upright-surface-eg-bullet-holes/1347193 "2023-10-27T00:23:24Z")

</div>

I’m trying to cast some points horizontally (rather than top-down), and I’m using World Ray Cast Query: If I set the ray direction to be 0,0,1, it’ll nicely cast the bottom sides of any geo: ok great :+1: Unfortu…

---

## [Raycast with LineTraceSingle Returns 0 Distance](https://forums.unrealengine.com/t/raycast-with-linetracesingle-returns-0-distance/1339459)

<div class="topic-metadata">

**Author:** [@NightmareGames](https://forums.unrealengine.com/u/NightmareGames)\
**Replies:** 4\
**Last updated:** [October 22, 2023, 10:12pm UTC](https://forums.unrealengine.com/t/raycast-with-linetracesingle-returns-0-distance/1339459 "2023-10-22T22:12:45Z")

</div>

I’m attempting a raycast to find a point of collision, and I’m using LineTraceSingle(). UWorld\* const world = GetWorld(); const TArray\<AActor\*\> actors\_to\_ignore; FHitResult hit; FLinearColor line\_color = FLinearColor(0,…

---

## [Raycasting not working in build](https://forums.unrealengine.com/t/raycasting-not-working-in-build/466912)

<div class="topic-metadata">

**Author:** [@MoarIQQ](https://forums.unrealengine.com/u/MoarIQQ)\
**Replies:** 1\
**Last updated:** [August 4, 2023, 4:41am UTC](https://forums.unrealengine.com/t/raycasting-not-working-in-build/466912 "2023-08-04T04:41:49Z")

</div>

Hi, I am creating a game in VR where I need a pointer system for my Widgets, but the issue i am running into is when I build the game my system doesnt work at all. But yet when I test it in the editor it works flawlessly…

---

## [How can I limit the AI Perception sight height?](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225)

<div class="topic-metadata">

**Author:** [@X3cut1ona](https://forums.unrealengine.com/u/X3cut1ona)\
**Replies:** 6\
**Last updated:** [July 9, 2022, 7:33pm UTC](https://forums.unrealengine.com/t/how-can-i-limit-the-ai-perception-sight-height/467225 "2022-07-09T19:33:03Z")

</div>

I am trying to limit the vertical scope of the AI Perception sight sense so when the player character is on a platform slightly above, the enemy will still not be able to detect them. Is there a specific property within …

---

## [How to make an object interactable with a click?](https://forums.unrealengine.com/t/how-to-make-an-object-interactable-with-a-click/490209)

<div class="topic-metadata">

**Author:** [@VelvetThePhantom](https://forums.unrealengine.com/u/VelvetThePhantom)\
**Replies:** 0\
**Last updated:** [October 30, 2021, 11:44am UTC](https://forums.unrealengine.com/t/how-to-make-an-object-interactable-with-a-click/490209 "2021-10-30T11:44:26Z")

</div>

I’m making a Life Sim game and am trying to figure out exactly how to go about making an object refill a “hunger bar” when the player moves close and clicks on it, the problem I’m having is that the “raycast” (hope I’m u…

---

## [How to make empty transforms?](https://forums.unrealengine.com/t/how-to-make-empty-transforms/476904)

<div class="topic-metadata">

**Author:** [@DeltaMike1010](https://forums.unrealengine.com/u/DeltaMike1010)\
**Replies:** 4\
**Last updated:** [April 21, 2021, 3:45pm UTC](https://forums.unrealengine.com/t/how-to-make-empty-transforms/476904 "2021-04-21T15:45:32Z")

</div>

Hi there! There are many approaches. Can you be more specific? For example You can use property of FTransform type and store it in UProperty. To use it you need to apply stored value to transform of owning Actor You ca…

---

## [LineTraceSingleByProfile does not hit](https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426)

<div class="topic-metadata">

**Author:** [@espaghetters](https://forums.unrealengine.com/u/espaghetters)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 4:41am UTC](https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426 "2021-02-08T04:41:25Z")

</div>

Hello. I’m using LineTraceSingleByProfile and I’m not getting an impact hit. The profile name is Enemy, so I’m wondering why this is not working. FHitResult HitResult; bool bSuccessfulHit = World-\>LineTraceSingleByProfi…

---

## [How to get bullet drop with raycasts](https://forums.unrealengine.com/t/how-to-get-bullet-drop-with-raycasts/478041)

<div class="topic-metadata">

**Author:** [@KielanT](https://forums.unrealengine.com/u/KielanT)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 9:37am UTC](https://forums.unrealengine.com/t/how-to-get-bullet-drop-with-raycasts/478041 "2021-02-02T09:37:54Z")

</div>

Hi, how would you achieve bullet drop with raycasts? Would you use multiple raycasts or use the start and end value to calculate the bullet drop or a completely different way? Thank you

---

## [How to rotate a box trace with the pawns rotation?](https://forums.unrealengine.com/t/how-to-rotate-a-box-trace-with-the-pawns-rotation/477771)

<div class="topic-metadata">

**Author:** [@KielanT](https://forums.unrealengine.com/u/KielanT)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 8:39pm UTC](https://forums.unrealengine.com/t/how-to-rotate-a-box-trace-with-the-pawns-rotation/477771 "2021-01-25T20:39:36Z")

</div>

Hi, I have a SweepMulitByChannel raycast that I want to rotate with the pawns rotation that it is attached to. It currently only stays in one rotation. How would I get it to rotate with the pawn? Here’s the raycast cod…

---

## [How to get primitive / vertices of mesh that contributed to specific pixel in rendering?](https://forums.unrealengine.com/t/how-to-get-primitive-vertices-of-mesh-that-contributed-to-specific-pixel-in-rendering/475077)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_98071a2b](https://forums.unrealengine.com/u/anonymous_user_98071a2b)\
**Replies:** 0\
**Last updated:** [November 27, 2020, 2:07pm UTC](https://forums.unrealengine.com/t/how-to-get-primitive-vertices-of-mesh-that-contributed-to-specific-pixel-in-rendering/475077 "2020-11-27T14:07:53Z")

</div>

Hi, I have a special use case where I need to know the connection between a rendered pixel and its mesh element(s) (primitive etc.). Basically I want to render from different camera positions and annotate each mesh elem…

---

## [Raycast doesn't register actor c++?](https://forums.unrealengine.com/t/raycast-doesnt-register-actor-c/458610)

<div class="topic-metadata">

**Author:** [@ECTheHunter](https://forums.unrealengine.com/u/ECTheHunter)\
**Replies:** 0\
**Last updated:** [November 19, 2019, 7:55pm UTC](https://forums.unrealengine.com/t/raycast-doesnt-register-actor-c/458610 "2019-11-19T19:55:17Z")

</div>

if (GetWorld()-\>LineTraceSingleByChannel(OutHit, Start, End, ECC\_Visibility, CollisionParams)) { if (OutHit.GetActor()) { ABomberCharachter \*bomber = Cast(OutHit.GetActor()); if (bomber) { if (GEngine) { GEngine-\>A…

---

## [Raycast for isometric type game](https://forums.unrealengine.com/t/raycast-for-isometric-type-game/457610)

<div class="topic-metadata">

**Author:** [@Shehanmark](https://forums.unrealengine.com/u/Shehanmark)\
**Replies:** 2\
**Last updated:** [October 29, 2019, 2:40pm UTC](https://forums.unrealengine.com/t/raycast-for-isometric-type-game/457610 "2019-10-29T14:40:45Z")

</div>

Hi guys, I’v been stuck with this problem for couple of days. I have a isometric type game where i want to raycast from the character by using its location and the direction its looking at. I have been gone through many…

---

## [I am trying to add raycast shooting to my game but it wont destroy actor](https://forums.unrealengine.com/t/i-am-trying-to-add-raycast-shooting-to-my-game-but-it-wont-destroy-actor/450441)

<div class="topic-metadata">

**Author:** [@Pillow](https://forums.unrealengine.com/u/Pillow)\
**Replies:** 0\
**Last updated:** [June 10, 2019, 5:49pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-add-raycast-shooting-to-my-game-but-it-wont-destroy-actor/450441 "2019-06-10T17:49:10Z")

</div>

I have a string setup and it says the enemy is hit but it wont destroy it for some odd reason. Please help!

---

## [\[Resolved\] Checking raycast on multiple objects](https://forums.unrealengine.com/t/resolved-checking-raycast-on-multiple-objects/448418)

<div class="topic-metadata">

**Author:** [@WilfreGD](https://forums.unrealengine.com/u/WilfreGD)\
**Replies:** 2\
**Last updated:** [May 5, 2019, 11:36am UTC](https://forums.unrealengine.com/t/resolved-checking-raycast-on-multiple-objects/448418 "2019-05-05T11:36:38Z")

</div>

Hello, I am working on a project where i want the player to interact with multiple objects, maybe hundreds. Where i can’t find a solution is for the many different interactions. Here, for example, i have a key, the play…

---

## [How to loop a sound when using a single line trace?](https://forums.unrealengine.com/t/how-to-loop-a-sound-when-using-a-single-line-trace/446691)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_9d11a5cf1](https://forums.unrealengine.com/u/anonymous_user_9d11a5cf1)\
**Replies:** 1\
**Last updated:** [April 6, 2019, 10:10am UTC](https://forums.unrealengine.com/t/how-to-loop-a-sound-when-using-a-single-line-trace/446691 "2019-04-06T10:10:40Z")

</div>

Hello I am trying to create a blueprint in which a single line trace (raycast) , Upon hitting an object (That has a certain type associated with it, such as floor, wall, object etc) will play a sound that then loops on …

---

## [Raycasting A 2D Point in the World](https://forums.unrealengine.com/t/raycasting-a-2d-point-in-the-world/425199)

<div class="topic-metadata">

**Author:** [@SysOverdrive](https://forums.unrealengine.com/u/SysOverdrive)\
**Replies:** 2\
**Last updated:** [October 18, 2018, 7:45am UTC](https://forums.unrealengine.com/t/raycasting-a-2d-point-in-the-world/425199 "2018-10-18T07:45:07Z")

</div>

Hi Guys, so I am basically trying to make a plugin for Unreal Engine for the pupil labs HTC Vive device in VR. This device does eyetracking and has as inputs the following Inputs: 2 floats representing the current pos…

---

## [How to prevent vehicle from flipping back on wheels](https://forums.unrealengine.com/t/how-to-prevent-vehicle-from-flipping-back-on-wheels/435089)

<div class="topic-metadata">

**Author:** [@Orilas](https://forums.unrealengine.com/u/Orilas)\
**Replies:** 3\
**Last updated:** [October 7, 2018, 4:42pm UTC](https://forums.unrealengine.com/t/how-to-prevent-vehicle-from-flipping-back-on-wheels/435089 "2018-10-07T16:42:51Z")

</div>

Hi, I’ve got a problem with my vehicle. My car is on its side, and it slowly rolling over on the wheels - it’s ok. When raycasts which is inside wheels hits ground, it flips the car immediately on back wheels, and it loo…

---

## [How do make a raycast game like wolfinstein?](https://forums.unrealengine.com/t/how-do-make-a-raycast-game-like-wolfinstein/434317)

<div class="topic-metadata">

**Author:** [@jaidendc](https://forums.unrealengine.com/u/jaidendc)\
**Replies:** 0\
**Last updated:** [September 23, 2018, 4:24am UTC](https://forums.unrealengine.com/t/how-do-make-a-raycast-game-like-wolfinstein/434317 "2018-09-23T04:24:57Z")

</div>

I want to make a game like wolfenstein where the player draws a few trace in a cone in front of them, if the traces hit something it gets drawn to the players screen, also how would I find the enemy’s transform in the le…

---

## [Is there a way to get a MediaPlayer from a texture of an Actor?](https://forums.unrealengine.com/t/is-there-a-way-to-get-a-mediaplayer-from-a-texture-of-an-actor/432818)

<div class="topic-metadata">

**Author:** [@4nof](https://forums.unrealengine.com/u/4nof)\
**Replies:** 0\
**Last updated:** [August 30, 2018, 6:24pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-a-mediaplayer-from-a-texture-of-an-actor/432818 "2018-08-30T18:24:08Z")

</div>

I don’t care whether this is done in C++ or Blueprints, but I have an Actor playing a video that I have selected using a Raycast line I want to find the MediaPlayer associated with that plane. can I have an event “On…

---

## [Trying to toggle visibility off when raycast is no longer hitting the object](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728)

<div class="topic-metadata">

**Author:** [@Legionx21](https://forums.unrealengine.com/u/Legionx21)\
**Replies:** 4\
**Last updated:** [July 19, 2018, 6:47am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728 "2018-07-19T06:47:56Z")

</div>

This is probably a super easy fix but I’m a noob and can’t for the life of me how to get the the text to toggle off when looking away. Please help!

---

## [Detect if mouse is over any UMG elements](https://forums.unrealengine.com/t/detect-if-mouse-is-over-any-umg-elements/428843)

<div class="topic-metadata">

**Author:** [@byg\_ben](https://forums.unrealengine.com/u/byg_ben)\
**Replies:** 1\
**Last updated:** [July 6, 2018, 11:17pm UTC](https://forums.unrealengine.com/t/detect-if-mouse-is-over-any-umg-elements/428843 "2018-07-06T23:17:22Z")

</div>

I’m currently highlighting things in the world by doing a raycast using GetActorByChannelAtScreenPoint. However I’d like to skip this any time the mouse is over any UMG elements. Is there a way to detect this?

---

## [Detecting blocks with linetraces](https://forums.unrealengine.com/t/detecting-blocks-with-linetraces/428817)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_e7f95ee81](https://forums.unrealengine.com/u/anonymous_user_e7f95ee81)\
**Replies:** 2\
**Last updated:** [July 6, 2018, 1:02pm UTC](https://forums.unrealengine.com/t/detecting-blocks-with-linetraces/428817 "2018-07-06T13:02:37Z")

</div>

Are you adding the actor doing the trace to the ignored actors on your FCollisionQueryParams? It’s possible you’re always hitting this actor depending on where you start the trace from.

---

## [Is this a UE4 Editor bug? (Behaviour explained)](https://forums.unrealengine.com/t/is-this-a-ue4-editor-bug-behaviour-explained/428165)

<div class="topic-metadata">

**Author:** [@VDR\_Reaper](https://forums.unrealengine.com/u/VDR_Reaper)\
**Replies:** 1\
**Last updated:** [June 26, 2018, 9:44pm UTC](https://forums.unrealengine.com/t/is-this-a-ue4-editor-bug-behaviour-explained/428165 "2018-06-26T21:44:10Z")

</div>

I’m currently using 4.19.2. Basically, here is my code for raycasting: — the raycast method — AActor \*ASandboxGameCharacter::raycast() { FHitResult hitResult; FCollisionQueryParams collisionParams; FVector start; F…

---

## [Creating a VR Weapon Raycast](https://forums.unrealengine.com/t/creating-a-vr-weapon-raycast/419161)

<div class="topic-metadata">

**Author:** [@Marinara.Sauce](https://forums.unrealengine.com/u/Marinara.Sauce)\
**Replies:** 2\
**Last updated:** [March 7, 2018, 6:30pm UTC](https://forums.unrealengine.com/t/creating-a-vr-weapon-raycast/419161 "2018-03-07T18:30:21Z")

</div>

Hello. Probably a simple question I’m trying to make an VR FPS where the weapon stays attached to the motion controller. I’m trying to get firing to work using raycast, but I can’t seem to get it working. The raycast ju…

---

## [Raycast order for a topdown game](https://forums.unrealengine.com/t/raycast-order-for-a-topdown-game/409432)

<div class="topic-metadata">

**Author:** [@zickig](https://forums.unrealengine.com/u/zickig)\
**Replies:** 7\
**Last updated:** [November 12, 2017, 7:42pm UTC](https://forums.unrealengine.com/t/raycast-order-for-a-topdown-game/409432 "2017-11-12T19:42:45Z")

</div>

I think you got a Fundamental missunderstanding how Linetrace works. If you trace by Channel Visibility as example it will return you the first thing you hit that Blocks on that Channel. It can be anything you mentioned …

---

## [Need Help with Raycast](https://forums.unrealengine.com/t/need-help-with-raycast/406668)

<div class="topic-metadata">

**Author:** [@a548922](https://forums.unrealengine.com/u/a548922)\
**Replies:** 9\
**Last updated:** [October 12, 2017, 6:44am UTC](https://forums.unrealengine.com/t/need-help-with-raycast/406668 "2017-10-12T06:44:01Z")

</div>

I am needing to create a Raycast from a fixed camera location that can generate from the mouse location on the view port. Think of it like an Arcade game where you have to create a bullet that spawns from the camera to t…

---

## [Aligning character to sphere](https://forums.unrealengine.com/t/aligning-character-to-sphere/406522)

<div class="topic-metadata">

**Author:** [@Nasanooel](https://forums.unrealengine.com/u/Nasanooel)\
**Replies:** 0\
**Last updated:** [October 9, 2017, 12:38am UTC](https://forums.unrealengine.com/t/aligning-character-to-sphere/406522 "2017-10-09T00:38:43Z")

</div>

Hi, I’m new to this engine though I am familiar with C++ and I’m having trouble doing what I thought would be quite simple when I saw UE had functions for it. I followed the tutorials to make my own moving character and…

---

## [Raycasting in Third person shooter template C++](https://forums.unrealengine.com/t/raycasting-in-third-person-shooter-template-c/396972)

<div class="topic-metadata">

**Author:** [@HEAVEN992](https://forums.unrealengine.com/u/HEAVEN992)\
**Replies:** 1\
**Last updated:** [July 4, 2017, 3:34pm UTC](https://forums.unrealengine.com/t/raycasting-in-third-person-shooter-template-c/396972 "2017-07-04T15:34:47Z")

</div>

Hello, I’m trying to use the Raycasting in Third person shooter template (c++). I’m following a youtube tutorial which used the First person template and trying to implement it in the Third person template. But I cann…

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