ScriptSpot

Forum topic · General Scripting

UI translating through to body.pos.x

By falconmick · 2012-09-26

Description

I just noticed somthing terrifying...

the UI inside of 3ds max has my distance being 8m... When I open up the xml file I generate which uses: body.pos.x, it has 314.961... Oh boy... scale is very important as it is a part of the physics and shaders.. Ive currently got my scaling set to 1 unit = 1 meter..

I'm pretty sure the issue will be that I am grabbing raw data from 3ds which isn't on a scale, then 3ds applies the required scale to your data inside of the GUI.. I just need that GUI scale to be a part of my script, not raw data

edit:
I should add, scale is also out, havn't tested rotations though.. knowing my luck somhow they will be out :(
but im pretty sure the main issue is sacle, cus I tested my exporter without looking into the data that it exported, just testing it in my engine, and it worked... just the scale was off teribly

Comments (4)

OK.

miauu · 2012-09-26

What the X, Y and Z spinners have to displayed?

falconmick · 2012-09-26

i fixed the issue:
for some reason, even though I set 3ds max to 1 unit = 1 meter, it was exporting exporting things 40x larger than they should have been (the obj's) so i used


fn getFormated unFormated = 
(
	brokenUp = filterstring (units.formatValue unFormated) "m"
	return brokenUp[1]
)

now the rotations are out =,= I'm gonna make a new post though as it's kinda un related

miauu · 2012-09-26

What is GUI - a rollout?

Maybe units.decodeValue and units.formatValue can help you.

falconmick · 2012-09-26

by a GUI i mean the bar allong the bottom which changes according to if your moving, scaling or rotating, see the pic:

http://i47.tinypic.com/15gpeeu.png