Script (Lib): 3D Comparison/Projection

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Script (Lib): 3D Comparison/Projection

Post by s9ilent »

A basic script pack which contains 10 scripts

Last Update 25/06/2008
Recent Changes:
*Fixed it all up, its now 100% complete, and tidier :)



swl.fn.project.xml
swl.fn.project.right.xml
swl.fn.project.up.xml

Arg's: distance
Ret: position array
Projects a point $distance units in front/right/up of THIS. Using negative distances projects the point to the rear/left/down. Returns the co-ordinates of said projection

swl.fn.project.offset.xml
swl.fn.project.right.offset.xml
swl.fn.project.up.offset.xml

Arg's: distance
Ret: position array (displacement array)
Similar to the above, but rather then returning the projections position, it returns the it's displacement from THIS. Useful when used inside loops.

swl.fn.face.xml
swl.fn.face.pos.xml

Arg's: origin, destination
Ret: True/Null
Checks whether the $destination, is in front of the $origin. i.e Is $origin currently facing $destination. The accuracy defines the "cone" or degree of accuracy in which to return true. Accuracy is equal to 1000 * tan (theta).
Eg, if you wanted a 45 degree cone (Knowing that tan45 is 1)
Accuracy = 1000 * tan45 = 1000* 1
= 1000

swl.fn.project.3d.xml
Combines project forward, up and right together
xwl.fn.project.3d.offset.xml
Displacement in 3d


[ external image ]
http://members.optuszoo.com.au/whyistha ... cripts.zip

To just view the scripts: (or download one at a time?)
http://members.optuszoo.com.au/whyisthat/scripts/
Last edited by s9ilent on Sat, 19. Jul 08, 00:09, edited 13 times in total.
russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo »

UMMM, what do you do with this?
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Its a library script for scripters use, mostly 3d trig related things
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Bump, Re Updated, now 100% functional

Hrm.. and apparently I can't spell pos-i-tive

Return to “X³: Reunion - Scripts and Modding”