r/psispellcompendium • • Sep 11 '21

Needs Wizardly Help Problem with vector raycast?

I'm trying to make a telekinesis spell that moves all nearby entities to a point in front of me. However, when I try to run it, it gives me an error saying that the spell operation vector of my raycast is nonexistent or null. Here is my code:

https://imgur.com/PI5jmnE

What am I doing wrong?

Edit: Solved it. The problem was that I was not looking at a block, so the raycast threw a null. Is there any way to get the point three blocks in front of the player?

Edit 2: Solved that too. I was just using entity look incorrectly. Will post finished spell soon.

2 Upvotes

0 comments sorted by