Find Look at Rotation always returns 0/0/0 even though input values are correct

Hey there!

I’m currently trying to make a projectile bounce between targets, and that involves firing a new projectile from the position of T1 toward T2. However, when I call Find Look at Rotation, it always returns 0/0/0, even though both input variables are correct. What am I doing wrong?

2 Likes

And you’re using the debugger to inspect the output?

Try using a print string, I think you’ll find it is producing output :smile:

( debugger can be a little flaky )

2 Likes

Yo dawg, we heard you like finding bugs, so we put bugs in your debugger so you can debug while you debug! :smiley:

Thanks a lot!

1 Like

Yes, it’s the recursive debugging experience… :melting_face:

Actually, I got it working halfway, but every once in a while, it randomly doesn’t work.

Find Look At Rotation returns 0/0/0 even though both other values are correct.

I’ve attached a video, and a couple of screenshots because I am at my wits’ end.

For the avoidance of doubt, the number of bounces per attack is supposed to be 5 always.

1 Like

Look at rotation does work. If you’re getting 0,0,0, it probably means both the input vectors are the same ( or are perfectly aligned? ).

Nope, I checked, they are different, and the projectile actually just goes straight off into nowhere.

1 Like

It will be something in your code :slight_smile: Sorry, but I can’t tell from your blueprint pictures what’s going on, they’re way to zoomed in.

Thanks for trying to help, I’ll try to get a better view. It’s just that this problem has kept me up for 2 days now.

Sorry, this is probably super spaghetthi, I’m still learning how to code in general.

Looking at it again, it does seem that sometimes, it picks the last target as the next target. Not sure why, but I’d appreciate any help in figuring it out.

I found out what’s wrong, thanks to your comment! I didn’t add the current actor to the list of new targets to be ignored, so every once in a while, it set the old target as the new target!

Thank you very much again. Not going to lie, having solved this feels better than sex.

1 Like

Good that you found it :smiley:

1 Like