BVEStation Forums

BVE => BVE/OpenBVE Support => Topic started by: Dr. Subway18 on March 29, 2012, 03:11:19 pm

Title: Car=to platform height
Post by: Dr. Subway18 on March 29, 2012, 03:11:19 pm
i have an existing train that i need to adjust the height to BMT/IND standards is there a translate code for that? dealing with an animated train
Title: Re: Car=to platform height
Post by: Gong Gahou on March 29, 2012, 07:26:53 pm
I just want to bring this up in case if you don't know: you can't use the Translate code for that because you only use that code to move objects, not scale them (the word "translate" here means "to slide" or "to move"). But I see where you're getting at. Unfortunately, I don't think there's a scale command or any other similar command, so you'll have to manually code the change yourself. It's tedious, but after you spend a lot of time coding objects you'll get used to it.  :)
Title: Re: Car=to platform height
Post by: Dr. Subway18 on March 29, 2012, 07:33:30 pm
yeah im gonna change height and width to the slant to make it fit the non irt routes, but now ik i have to take the time to make prefection. thanks
Title: Re: Car=to platform height
Post by: [CT1660] on March 29, 2012, 08:03:14 pm
OpenBVE uses meters, keep that in mind.

To save some time, use the replace feature (ctrl+H) on notepad.
Title: Re: Car=to platform height
Post by: HijauKuda on March 30, 2012, 09:51:03 am
Last line in B3D files to rescale|rotate an entire object:
SCALEALL +|-X,+|-Y,+|-Z

To scale an entire object to 90% of original size:
SCALEALL +0.900,+0.900,+0.900

To rotate an entire object 180deg around the Y axis:
SCALEALL -1.000,+1.000,-1.000
Title: Re: Car=to platform height
Post by: Gong Gahou on March 30, 2012, 12:29:54 pm
So there actually was a scale command! I guess I should have looked at the Developing for openBVE page instead of relying on my memory.   :P

But HijauKuda, why use the Scale command to rotate the object when there's the Rotate command?
Title: Re: Car=to platform height
Post by: Dr. Subway18 on March 30, 2012, 03:01:38 pm
so if the car is IND BMT length and IRT width do i scale all 20%
Title: Re: Car=to platform height
Post by: HijauKuda on March 30, 2012, 04:07:01 pm
...why use the Scale command to rotate the object when there's the Rotate command?

If you require scaling, say 90%,
and simple 180degree rotation, then use:
SCALEALL -0.900,+0.900,-0.900
to save writing an additional line of ROTATEALL code.
This is equivalent to:
SCALEALL +0.900,+0.900,+0.900
ROTATEALL 0,1,0,+180.0

If you require scaling, say 90%,
and an odd angle rotation, say 30degrees, then use:
SCALEALL +0.900,+0.900,+0.900
ROTATEALL 0,1,0,+030.0

See this page:
http://trainsimframework.org/develop/object_b3d.html (http://trainsimframework.org/develop/object_b3d.html)