Anti-aircraft module help

I’m having trouble with making props set it’s angles to it’s target’s angles.

Just like on the camera tool, you can set your eye angles to follow a prop or entity.
I want to make the prop change it’s angles to a person’s or other entity’s position.

I have failed with everything, I just cannot rap my head around it. I tried target:GetPos( ); and target:GetAngles( );.

Feel free to start with this, or make your own for me. Thanks a lot, if you get it to work.

[lua]prop = ents.Create( “prop_physics” );

hook.Add( “Think”, “AngleThink”, function( )
prop:SetAngles( Angle( 0, 0, 0 ) );
end );

prop:SetModel( “models/props_c17/FurnitureBathtub001a.mdl” );
prop:Spawn( );


I was also thinking it needs a normalized vector.

Can anyone take time out of their day to help someone in need? :smiley:


Are you serious, is that how easy it is?

EDIT: Tested it out, works like a charm, thanks kevkev :smiley:

No problem.