I'm working on a game that uses a giant ballista to launch bolts at a physiced fort, where the walls and such can be knocked around and destroyed.
I want the bolt to stick in when hitting such a wall, but I'm not sure how.
On a static wall I can just swap out the bolt sprite for a static one that just stays in place after a collision, but then when the wall moves or disappears the bolt will just be floating there.
I can set an image point on the wall and stick the bolt to it every tick, but then the bolt will stick to exactly the same point regardless of where it actually struck.
Is there perhaps some way I could register the position of the bolt relative to the position of the wall's Origin on a collision, then set it to that every tick?