Thursday, June 21, 2012

Gmod Third Person View Using Wire And E2

I decided to share a third person view thing I made in Garry's Mod using Wiremod, and E2.



And here's the E2 "third_person" code:
@name third Person
@inputs
@outputs Angle:angle Position:vector
@persist
@trigger

runOnTick(1)

R = 120

Angle = owner():eyeAngles()
Yaw = Angle:yaw()
X = cos(Yaw) * R * (-1)
Y = sin(Yaw) * R * (-1)

Position = owner():pos() + vec(X,Y,90)

No comments:

Post a Comment