Skip to content

Renamed damping to attenuation - #204

Open
RasmusAlgoryx wants to merge 26 commits into
masterfrom
feature/damping-to-attentuation
Open

RasmusAlgoryx wants to merge 26 commits into
masterfrom
feature/damping-to-attentuation

Conversation

@RasmusAlgoryx

Copy link
Copy Markdown
Contributor

Change native calls to match name change in coming AGX update and changed defaults and calculations of damping values to instead reflect the corresponding attenuation value..

@RasmusAlgoryx
RasmusAlgoryx requested a review from FilipAlg June 22, 2026 11:22
@RasmusAlgoryx RasmusAlgoryx self-assigned this Jun 22, 2026
@@ -320,36 +320,36 @@ public void SetCompliance( float compliance, Constraint.RotationalDof dof )
}

/// <summary>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a migration for this file as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that since the attenuation which is renamed here is a property of the constraint that the migration code in the constraint would handle this.

Comment on lines +83 to +84
[FormerlySerializedAs( "m_damping" )]
private float m_attenuation = 2.0f;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a migration for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class does not derive from our ScripComponent or ScriptAsset classes so there is no migration mechanism in place but yes, this shoud be migrated. This seems hard though since it is not versioned in the serialization as the scriptASsets are.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CableProperties is a subclass of ScriptAsset so I suppose the migration should live there?

Comment thread AGXUnity/PickHandler.cs Outdated
Comment thread AGXUnity/IO/OpenPLX/OpenPLXImporter.cs Outdated
RuntimeMapped = new Dictionary<string, agx.Referenced>();

agxPowerLine.PowerLineRef powerline = mapper.mapDriveTrainIntoPowerLine( Native as openplx.Physics.System);
agxPowerLine.PowerLineRef powerline = mapper.mapDriveTrainIntoPowerLine( Native as openplx.Physics.System, Time.fixedDeltaTime);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulation time step is not necessarily Time.fixedDeltaTime since the updates might be called from Update. I think it's better if we use Simulation.Instance.TimeStep

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not interfere with the initialization order?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulation should be initialized first since basically all other components insert themselves into it's native representation so it should already be initialized here and if not, it should be fine to perform initialization of Simulation here

@RasmusAlgoryx RasmusAlgoryx removed their assignment Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants