Psi

Psi

45M Downloads

Projectile spell entity + Enity Axial Look Direction

alpharou opened this issue ยท 4 comments

commented

I've noticed some strange behavior with the Projectile Entity. When you access it's direction it just does random things, in some cases is consistent, other it outputs random vectors all over the place.

What I'm trying to do: Get a vector starting at the collision's coords, module 1, direction the direction of the spell projectile.

What I tried to do: I've somewhat circumvented this issue using the caster's look direction, but it's not the same, you could turn fast enough to affect the expected effect.

What I think should happen: Calling Entity axial look/regular look direction should accommodate for the direction the projectile was shot, instead of flipping on the Z axis when using axial look, or returning unpredictable results with the regular direction read.

commented

EDIT: Axial look is buggy in general from my experience.
From what I understand so far, you're trying to get the direction the projectile is headed. Simple look vector of the projectile entity should do that. I'm not sure if it's what you're looking for specifically but you'll have to manage workarounds using look vector and player position. Can you tell me what you want the spell to do?

commented

Well... I wanted to make a spell to break blocks in a row. Also, the look vector does not work as intended.

commented

as far as I know the only spells that do that are for the psi pickaxe. you can find similar spells on the compendium. otherwise, if you're looking to make your own psigun spell to do this, I haven't found a possible way to do so based on look direction and all that.

Can we possibly move this to /r/psispellcompendium with you stating the full idea of what you want the spell to do? Would be plenty easier to help that way and someone else might tune in to give some tips as well.

commented

I figured it out. It was simple enough when you don't go the focal point's look vector rabbit hole (which is the buggy functionality that stopped me at the moment) I could post it there, but I found out that there are already better versions of this branch mining spell out there. Anyway, this issue was created because of that exact look vector bug and I still think it should behave as I stated in older posts. There's no real way why it should not work. Maybe making the look vector of the projectile be it's movement vector... It makes sense doesn't it? So that it looks where it goes.