Author Topic: VCE Variables : PlayerAim  (Read 1544 times)

Aim? Like orientation?

<var:player:oriX>
<var:player:oriY>
<var:player:oriZ>

I was thinking about this last night. BL needs to stealborrow some things from Gmod Wire Tool. Like Aimer, worldposition, etc.

I think Deathwishez got the idea, but you wouldnt need z.

<var:player:oriX> = Angle your facing on the X axis, (Across). In degrees. N = 0o. Just less than that is 359o
<var:player:oriY> = Angle your facing on the Y axis, (Or is this Z?) (Up and down). In degrees. Fully up is 180o, fully bottom is 0o.

Ive tried to make a simpler version of this, it failed epicly..

You would need Z.

The X orientation is from up to down (from feet to sky)
The Y orientation is from left to right (tilting, which can only be done in vehicles)
The Z orientation is from front to back (spinning around)

No...

Ugh this is hard to explain.
It took me a while to understand that.

Basically, you want a VCE event that targets an output event in the direction your player is facing?

Player:
[  O]     ---------->
 ----      S T A R E

They step on a brick:
Onplayer touch - self - VCE_Ifvalue - [<var:pl:(X,Y,Z)facing>] [200]
Vartrue - player - kill

OR this

They step on a brick:
Onplayer touch - self - VCE_Ifvalue - [<var:pl:facing(East, up, down, west, south, north>] [1]
Vartrue - player - kill

The one Means "Yes", and the reason the first one has 200, Is because they want the angle at 200 Degrees X (Litteraly)

I think he meant this / This should be made.
« Last Edit: May 24, 2010, 08:57:39 PM by Alphadin »

This is what I said.

onPlayerTouch > Self > VCE_ifValue > [<var:pl:oriX>] >= [180] [ ] (This means that the player is looking straight up or more)

Chart:

X @ 0 = Straight down
X @ 90 = Straight forward
X @ 180 = Straight up
X @ 270 = Bending backwards and seeing behind them (Not possible under normal circumstances)

Y @ 0 = Standing straight up
Y @ 90 = Laying on side with head facing right (Not possible under normal circumstances)
Y @ 180 = Upside down (Not possible under normal circumstances)
Y @ 270 = Laying on side with head facing left (Not possible under normal circumstances)

Z @ 0 = Facing forward (North)
Z @ 90 = Facing east
Z @ 180 = Facing south
Z @ 270 = Facing west