Sign in to follow this  
gcard28

Attaching projectile to a mesh

Recommended Posts

gcard28    171
Hello I have a question in regards to projectiles. In several games you are able to fire a projectile and have it hit an enemy and stick to the enemy at the point of impact. Then as the enemy plays it's death animation the spike or projectile follows the animation at the location where it hit the mesh. Does anyone know how this is done? Or could point me to any information that might be helpful? Many thanks in advance for any help you anyone can give me. Thanks

Share this post


Link to post
Share on other sites
th0r1000    122
Hi there,

What I would do is the following:

You have your projectile moving at a velocity toward your target, when it reaches your target set your velocity to 0 and then just add your intersecting vertex movements to your whole projectile mesh. This would cause your projectile to follow your target. This is my first post so hopefully I've explained it properly enough.

Ciao

Share this post


Link to post
Share on other sites
Crisium    100
Hi,

this is about transformation hieraki... if object "B" is a child of object "A" then "B" will always have a local transformation to object "A".

In other words... when you throw your spear it's actually in world space. When you hit your monster then you move the spear from world space to local space for you monster. Then you spear will follow the monster.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this