Bf read.ReadVectorNormal

From GMod Wiki

Jump to: navigation, search
Function
Syntax bf_read:ReadVectorNormal( )
Description:
Converts an incoming vector to a normalized vector automatically.
Returns: Vector
In Object: Bf_read
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Bf read.ReadVectorNormal]Bf read.ReadVectorNormal [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints the incoming vector normal from an usermessage called SendVectorNormal
Used onNewerClient.png
Code
 
local function ReadVectorNormal(msg)
   local vec = msg:ReadVectorNormal() -- reads the vector normal
   print(vec)
end
usermessage.Hook("SendVectorNormal", ReadVectorNormal)
 
OutputA vector normal(ie. Vector(0.358,0.373,-0.958)) is printed in console.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox