Page 1 of 1

Setting component heading, pitch, roll with scripts

Posted: Fri May 20, 2016 3:14 pm
by chrisell
I'm trying to find a creative way to get the shock absorbers that are attached to the wagons and bogies of my current project to behave better. Right now if I attach them to the bogie or the wagon, once the train is on curved track, one end of the shock absorber pulls away from the mounting point at the other end (obviously).
I want to use the GetCurvatureAhead function to twist the shock absorbers based on the curve radius (plus or minus some yet-to-be-determined calculation) so they look like they're still attached at both ends.
All I need is a setobjectposition type command in the scripts but I've not found anything like that. The only option I have at the moment is to make an animation for each shock absorber, then try to pick a position in that animation based on the track radius. Which is a gigantic pain in the . and is so complicated right now that I think the sheer complexity of it far outweighs the visual result.
Anyone with any better ideas ?
Thanks.