#Raycast returning nil although it seemingly shouldn't

44 messages · Page 1 of 1 (latest)

harsh aspen
#

trajectory highlight in which the issue is clearly visible

ebon scaffold
#

Sorry bro but I aint reading allat

#

Can u say it in less words?

harsh aspen
#

of course

#

basically i am casting rays through a basepart but although it visually intersects, the result is nil

#

the image shows the waypoints of the trajectory, which as you can see go through the baseplate

glossy patioBOT
#

studio** You are now Level 4! **studio

ebon scaffold
#

Let me go in vsc and read that code

#

Brb

harsh aspen
#

thanks

ebon scaffold
# harsh aspen thanks

Im not sure whats the error but try to change,

local result = workspace:Raycast(Shell.Position, targetPosition) to local result = workspace:Raycast(Shell.Position, targetPosition - Shell.Position)

#

Oh wait

#

There are more parts of code

#

Forgor to read everything

#

💀

harsh aspen
#

you are very possibly right

#

don't bother

#

i put in a position not a direction

#

which is incorrect

ebon scaffold
#

It needs a vector3

#

Argument

#

So yes

#

If it dont help tell me, i will continue to read other parts u sent

harsh aspen
#

well that doesn't seem to change much apparently

ebon scaffold
#

well

#

thats very sad

harsh aspen
#

i'll try and dig more, but thanks for your help

ebon scaffold
#

the shell movement

#

too fast

#

it might pass through the baseplate between two heartbeat events without being detected by the raycast

#

use Workspace:Raycast with RaycastParams parameter

#

and set the FilterType property to Enum.RaycastFilterType.Blacklist

#

also

#

CollisionGroup property to Debris

#

so u will detect

#

collisions

#

that dont collide

#

wait that sounds

#

weird

#

mhmm no idea

harsh aspen
#

tried largely increasing the baseplate's Y size so the moving object would certainly stay in it for more than seconds, but it doesn't change much either

harsh aspen