Difference between revisions of "Contact:getNormal"

m (fixed a typo)
m (included link to other languages)
Line 1: Line 1:
== Function ==
 
 
Get the normal vector between two shapes that are in contact.
 
Get the normal vector between two shapes that are in contact.
  
 
This function returns the coordinates of a unit vector that points from the first shape to the second.
 
This function returns the coordinates of a unit vector that points from the first shape to the second.
 +
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 16: Line 16:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Get the normal vector between two shapes that are in contact.}}
 
{{#set:Description=Get the normal vector between two shapes that are in contact.}}
 +
== Other Languages ==
 +
{{i18n|Contact:getNormal}}

Revision as of 19:57, 22 January 2011

Get the normal vector between two shapes that are in contact.

This function returns the coordinates of a unit vector that points from the first shape to the second.

Function

Synopsis

nx, ny = Contact:getNormal( )

Arguments

None.

Returns

number nx
The x component of the normal vector.
number ny
The y component of the normal vector.

See Also

Other Languages