• Entity Angles Point At Other Object?
    2 replies, posted
Hello, I have a ClientsideModel (arrow model) being created and I'm using a Think hook to manipulate the model's angles/position and such. I want to make the entity's angles point in the direction of another entity. Using a quick test, I was able to do this with the players angles using: [code] _Angle = EyeAngles() _Angle:RotateAroundAxis( Ang:Right(), 90 ) _Angle:RotateAroundAxis( Ang:Up(), -90 ) [/code] I've tried getting the entities angles but that just replicates the angles of the entity it's trying to point at. I feel really dumb right now, any insight would be great. <3
Did something like that before on E2, don't remember all details but: [code]ent:SetAngles( ( ent:GetPos() - ent2:GetPos() ):Angle() )[/code] If it works (sorry if it doesn't) and is inversed, just swap positions. :smile:
Or [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/PointAtEntity]Entity:PointAtEntity[/url]
Sorry, you need to Log In to post a reply to this thread.