Hi,

I need to attach a model to another model. I don't know the engine enough, so I started to search for it. I found a little code for attaching using with vertex/bone. Link is here;

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&topic=46005&gonew=1

Then I tested it, it works. But there is a problem as he said. The model is turning while my character animating.

In that topic "Superku" is talking about using a third vertex and set the gun's roll with that vertex. I stucked in that part. I can't make it.

How can I change model's roll with a functions like vec_to_angle ? vec_to_angle is computing only pan and tilt. But I need changing roll. I tried something like

Code:
vec_for_vertex (my.skill1, player, 33);
		vec_for_vertex (my.skill4, player, 10);
		vec_diff (my.skill7, my.skill4, my.skill1);
		vec_to_angle (my.pan, my.skill7);
		vec_set (my.x, my.skill1);

 my.roll = 0;



It doesn't works.

I selected another vertex for roll. The vertex number is "31".

I hope you can help me. Thanks in advice.