How to make arrows stick to things

Hi Everyone! I am new but anyways here is something I need. I am making a game where you shoot arrows and I want them so stick to the walls or people. So how do I do this. I could use enable but it would stay in mid-air if enemy was moveable. So how?

3 Likes

hmm let me think…

Ok thanks take your time

im working on it but the code is bugging out for some reason. im really close so

1 Like

it is REALLY bugging out
for some reason it is only outputting some of the code

1 Like

one sec imma restart my computer just to see if that fixes this problem
IVE GOT IT!!!

1 Like

Not sure what kind of game you’re making, but I have an arrow system that should work, though the code is a bit complex. Try the last level of this game, and Left Click to fire Arrows:

Is that sort of what you’re looking for? If you shoot an enemy, the arrow sticks in them.

1 Like

uh i already solved this one but over messages because it wouldnt let me post again

Attacher Block I think.

no that wouldnt work because it would be in the middle of the sprite, and would never change angle

as i said, i already solved this issue, but they just havent put it as solved, probably because they dont know they can

Yeah so, maybe if it hits the an object, it starts extracting that objects position values and sets its velocity to 1 while making the offset of the values based on where it hit the other thing.

1 Like

uhh ill send you the video i made on how i solved it one sec (i think i may have tried that and it didnt work)
https://drive.google.com/file/d/1Vg2GHoMVhWynmKtVwL6l1SCt6nQPOFGL/view

you could just disable the arrow when it hits a static object

that makes the arrow float dude

no it doesn’t, it just only works for static objects