You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Currently my door has detection parts to detect when the player hovers their mouse, but it gets in the way of my raycast, so I resorted to collision groups. I want it to smoothly ignore the detection parts without any problems.
What is the issue? Include screenshots / videos if possible!
For some reason, my raycast almost ‘reflects’ away from where im shooting at and is way off from where my mouse is, this only happens when im shooting through the collision group parts.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I just can’t figure out what’s going wrong, I tried messing around with collision groups and with no success, I tried searching up my problem but couldn’t find anything that worked.
your “exactpos” variable is actually the vector not a position
if i understand correctly your main issue is the bullets not going near the right place
i reckon the problem is somwhere in the spread you are trying to apply to the vector and for good measure try without the *config.maxrange
overall just try it with
local Direction = ((exactPos).Unit)*20
see if this makes it better then we will know if we gotta rework the spread and maxrange
I tried what you did, and unfortunately it did not work, the same problem is still happening and it did not seem to change anything. If you need more of the code to be provided please let me know.
I never realized that mouse.hit.p was returning the detection parts position and thus messing with the raycast, you don’t know how grateful I am for your help!