BVEStation

Author Topic: Car=to platform height  (Read 5043 times)

Offline Dr. Subway18

  • Operator
  • ***
  • Posts: 441
  • Gender: Male
  • proud 1999 Kenworth W900B owner(NTC cummins, 10sp)
    • View Profile
Car=to platform height
« 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

Offline Gong Gahou

  • Operator
  • ***
  • Posts: 258
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Car=to platform height
« Reply #1 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.  :)
Previously known as pjiang6211

Offline Dr. Subway18

  • Operator
  • ***
  • Posts: 441
  • Gender: Male
  • proud 1999 Kenworth W900B owner(NTC cummins, 10sp)
    • View Profile
Re: Car=to platform height
« Reply #2 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

Offline [CT1660]

  • Dispatcher
  • ****
  • Posts: 575
  • Gender: Male
  • openBVE Developer, OMSI Repainter & Engine Modder
    • View Profile
    • Enter The Lair
Re: Car=to platform height
« Reply #3 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.

Offline HijauKuda

  • Conductor
  • **
  • Posts: 207
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Car=to platform height
« Reply #4 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

Offline Gong Gahou

  • Operator
  • ***
  • Posts: 258
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Car=to platform height
« Reply #5 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?
Previously known as pjiang6211

Offline Dr. Subway18

  • Operator
  • ***
  • Posts: 441
  • Gender: Male
  • proud 1999 Kenworth W900B owner(NTC cummins, 10sp)
    • View Profile
Re: Car=to platform height
« Reply #6 on: March 30, 2012, 03:01:38 pm »
so if the car is IND BMT length and IRT width do i scale all 20%

Offline HijauKuda

  • Conductor
  • **
  • Posts: 207
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Car=to platform height
« Reply #7 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
« Last Edit: March 30, 2012, 04:13:53 pm by HijauKuda »