#Raycasts

1 messages · Page 1 of 1 (latest)

fickle moon
#

trying to make a raycast hitbox, testing somethings, I fired raycasts from multiple attachments to one point, only one gave me raycast results

#

starting to see some issues

#

it acc fires from the origin and not from the attachment

marble dust
#

Oh the reason why it's because you're using the wrong argument for the second one.
It shouldn't be workspace.boom.Position because that second one is ray direction

You can just get the direction by

v.Position - workspace.boom.Position

That's probably it

marble dust
#

It might be just try it out..

marble dust
# fickle moon oh

Actually wait switch it around I meant workspace.boom.Position - v.Position

#

Since it's the direction towards boom

fickle moon
fickle moon
#

I'll use the attachments worldcframe

#

instead

marble dust
fickle moon
distant heart
#

to get a direction of that is also you need to use .Unit

#

(v.Position - workspace.boom.Position).Unit

distant heart
#

also the params for raycast is this RayCast(starting position, direction, raycastParams)

marble dust
#

Because the outcome would still be the same regardless with roblox's raycast right?

distant heart
distant heart
marble dust