Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Return Object Vectors into CSV Strings

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 7th Jul 2015 20:46 Edited at: 8th Jul 2015 22:05
The Object vector CSV functions in this snippet provides you with what you need to quickly output text or assign values containing the position, rotation, scale or size of objects or limbs.

Rather than writing the following frequently used operation:

Text 0, 0, Str$( Object Angle X(id), 1) + "," + Str$( Object Angle Y(id), 1) + "," + Str$( Object Angle Z(id), 1)

You can perform the same with less code by writing the following:

Text 0, 0, ObjAng$( objectId, iDecimalPoints )

Each function has an additional version which returns the comma seperated string with spaces. All functions require a decimal point count.

I provided a Vector2, Vector3 and Vector4 version of this solution here, which requires Matrix1 utilities to validate vector types.



Login to post a reply

Server time is: 2024-11-21 12:01:06
Your offset time is: 2024-11-21 12:01:06