Angle stuff! How can I attach this SENT to a certain part of a door?

Hey all,
I have a SENT that I want to attach to a door.
I already have all the code set up, I just need to find out how to do all the angle-y stuff.

Here’s what I’ve got:

[img_thumb]http://i.imgur.com/UULPtuk.jpg[/img_thumb]

Here’s what I need:

[img_thumb]http://i.imgur.com/kXjoygQ.jpg[/img_thumb]

So basically:

  • Face the SENT to the floor.
  • Show that specific face of the SENT.
  • Attach SENT to front of the door.
  • Bring SENT to the top of the door.
  • Center the SENT in the middle of the door horizontally.

How can I go about doing this? I already have some stuff summed up that I can do, but it’d be great to get some examples.
Here’s my code, if anyone wants to know:


function ENT:Touch(ent)
	local doors = {"prop_door_rotating","func_door","func_door_rotating"}
	if (table.HasValue(doors,ent:GetClass())) then
		if (self:GetNWBool("AlarmAttached") == false) then
			self:SetMoveType(MOVETYPE_NONE)
			-- here will be the pos and ang code!
		end
	end
end