A basic library for vectors. Vector library per se might be a misnomer because the point of the library was so that one doesn't need to fiddle around with vectors, just that vectors are used internally. However the library does come with in built functions for things like dot and cross products in the case the user wants to work at a lower level. More for proof of concept than anything else.
Update History: 04/12/06 - v1.02:
- Added short demonstration module, more strange functions can be found in the module, so please check it out.
- Changed the way family of LocAtAngleTo* functions work. the angle of 0.0 degrees is the facing of the reference location or object.
- Added slightly more abstraction.
Notes:
Generally, a vector has a magnitude, and a direction. In the case of NWN2, vectors are used to represent positions in an area. these vectors consist of three parts, the x, y and z coordinates because NWN2 Areas are three dimensional.
Uses:
Because vectors are so abstract, they're useful to find locations relative to other objects or locations.
e.g. LocInFrontOfObj(oPC, 5.0);
would return a *Location* (not vector) 5.0 units in front of the PC.
therefore you can use it in the context:
ActionJumpToLocation(LocBehindObj(oPC, 5.0));
And the action subject will teleport 5.0 units behind the PC.
Attachment | Size |
---|---|
vector_library_demonstration.mod | 6.12 MB |
vectors_1.02.erf (91) | 11.5 KB |