Sticky Situation!!!

How do I have a an object that shoots then it sticks to another object. Then a few seconds later it will fade away?

For shooting and collision detection look into using rigidbodies, those are a part of our physics system. Once you detect a collision between your projectile object and some surface, you apply some constant force strong enough to hold it in place. Then after “enough time” has elapsed, you fade the object out (adjusting the alpha of it’s material or something like that).

If you’re new to our physics engine then start simple with basic shooting and collision detection and build from there. Here’s a good place to start:

Physics

When object-a collides with object-b, simply create a joint between the two.

You can see this technique in FlashBang Studio’s game, Splume. However iirc, they instanced an invisible intermediary object and attached both objects to it with joints. Can’t quite remember why they needed to do that, but it’s mentioned in their Unite 2007 talk on physics in Unity games.

Another approach is to find the collision and then attach the object as a child. That way, it will cease to be under physical control and you might save some calculation time… unless you need collisions during the time when it is attached.