Creating multiple line trace with for loop

Hi, I had created two line traces.


I am wondering if I can use for loop to create multiple line traces, for example adding a value of 100 in z axis for each index.

image

Thank you!

Yes, you could. Of course, the more traces you do on tick, the heavier it’s going to get.

If you just want to gradually extend traces in the same direction, you can use a multi trace

image

It’s only really when you want to do some like tracing in a sphere, you might use a loop.

But is there any guidance on how I can do it?
Cause in Python, the code looks like this.
image
But how do I add 100 in the z axis for every “i” in Unreal Engine?
Sorry I am still new to Unreal Engine.

I want to create multiple traces for different angles, as in different z axis, but their x and y axis values will be the same

For every hundred along X ( which I think your example is heading for ), use

To move up Z, just use ‘get up vector’

3 Likes

Oh, got it, thank you so much for your help,

2 Likes

Hi there @zequann. Hope you’re well!

This topic has been moved from International to Programming & Scripting.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile: