Sign in to follow this  
ChristOwnsMe

Attaching object to mesh outline

Recommended Posts

If the mesh is mostly flat with some variable hills like the image maybe you could get away with a simple raycast 'into' the mesh to essentially ground clamp to it.If it can be an arbitrarily 3d mesh you need to follow around I'm not sure there is a simple way to do that.

Share this post


Link to post
Share on other sites

bones? or no bones?

 

no bones? hmm....

 

you'd need to associate your point with a vertex on the mesh, define a distance from the surface of the mesh to be maintained, then compute the point's location based on the desired distance and the vertex position.  

 

but in what direction ?

 

well, in the direction of the vertex normal might be the first thing to try, or perhaps in a direction which is the average of the face normals of all triangles connected to the vertex. this would give more uniform (smoother) results with a dynamic mesh.

Share this post


Link to post
Share on other sites

So I am using bones, but I thought it'd be easier to just have one point in the center of the character be the point that is tracked in relation to the wall. This way I can just make the animation look like it is climbing the wall without having to worry about all the limb colllisions etc. The cave walls can curve into an overhang too, so I don't think I can just cast in one direction since the wall you are climbing can vary if it is left, up or right.

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