Posted by Anonymous on Fri 19th Jan 13:54
download | new post
- function ENT:TrackEntity( ent ) //Andyvincents code for top view
- if ( !ent || !ent:IsValid() ) then return end
- local WPos = ent:GetPos()
- WPos = WPos + Vector( 0, 0, 520 )
- if (self.Entity:GetPos() - WPos):Length() > 200 then
- self.Entity:SetPos(WPos)
- Msg("to far away!\n")
- end
- local v = ent:GetVelocity()
- local adjustVec = Vector(self.Entity:GetPos().x, self.Entity:GetPos().y, self.Entity:GetPos().z)
- // if (v.z == 0) then
- // self.Entity:SetPos( adjustVec )
- // end
- if (SERVER) then
- self.Entity:SetLocalVelocity( v )
- end
- local Ang = ent:GetPos() - WPos
- Ang = Ang:Angle()
- Ang.Pitch = 45
- self.Entity:SetAngles(Ang)
- end
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.