Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truckfile: misbehaving set_beam_defaults_scale? #760

Closed
ohlidalp opened this issue Feb 9, 2016 · 5 comments
Closed

Truckfile: misbehaving set_beam_defaults_scale? #760

ohlidalp opened this issue Feb 9, 2016 · 5 comments

Comments

@ohlidalp
Copy link
Member

ohlidalp commented Feb 9, 2016

Reported by derbymutt in Gitter chat:

I realize the wiki was never really clear about this, but set_beam_defaults_scale was previously able to be used more than once; as well as it only affected set_beam_defaults lines below it until the next set_beam_defaults_scale, recent builds of RoR from github are ignoring any instances of it other than the first one

I feel like this is a pointer issue since its only being assigned once, even though the code looks like it should be parsing and assigning it each time

lines 1729, 1733, 1737 and 1741 of /rig_file_input_output/RigDef_Parser.cpp might be to blame

@derbymutt
Copy link
Contributor

I've gone ahead and recorded a couple clips showing the issue visually, this n/b is based around 2 set_beam_defaults_scale, one at the top, and one at the custom generated tire shocks.

When the second scale is assigned correctly, the tires break under lateral force as they are meant to.
When the second scale is not assigned, the tires fail to break.
https://youtu.be/K48mwy5Zykg <--- working (0.4.0.8)
https://youtu.be/3Ut5tACRsu8 <--- not working (0.4.6.0)

I've gone ahead and put the zip of the vehicle below to offer some kind of existing content which relies on multiple instances of set_beam_defaults_scale for testing.
https://www.dropbox.com/s/9f86xxbtce4xqvm/The%20Habanero.zip?dl=0

@ulteq
Copy link
Contributor

ulteq commented Feb 9, 2016

All set_beam_defaults_scale lines in your example truck are identical.

@ohlidalp
Copy link
Member Author

Derbymutt, Gitter chat:

What happened to the helpful debug output, things saying how much a beam's defaults were scaled by set_beam_defaults_scale?

I'll add it back.

@ohlidalp
Copy link
Member Author

I still need to investigate the set_beam_defaults_scale

@ohlidalp ohlidalp reopened this Feb 10, 2016
@ohlidalp
Copy link
Member Author

TODO: Re-implement the informative log message about set_beam_defaults + scale:

if (default_spring_scale != 1 || default_damp_scale != 1 || default_deform_scale != 1 || default_break_scale != 1)
{
parser_warning(c, "Due to using set_beam_defaults_scale, this set_beam_defaults was interpreted as " + \
TOSTRING(default_spring * default_spring_scale) + ", " + \
TOSTRING(default_damp * default_damp_scale) + ", " + \
TOSTRING(default_deform * default_deform_scale) + ", " + \
TOSTRING(default_break * default_break_scale), PARSER_INFO);
}

@ulteq ulteq closed this as completed Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants