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

Fixed Pilus Physics Size #1373

Merged
Merged
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/microbe_stage/organelle_components/PilusComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected override void OnPositionChanged(Quat rotation, float angle,
membraneCoords *= 0.5f;
}

float pilusSize = 4.6f;
float pilusSize = 3.2f;

// Scale the size down for bacteria
if (organelle.ParentMicrobe.Species.IsBacteria)
Expand All @@ -54,8 +54,8 @@ protected override void OnPositionChanged(Quat rotation, float angle,
// pilusSize);

var shape = new CylinderShape();
shape.Radius = pilusSize / 10.0f;
shape.Height = pilusSize;
shape.Radius = pilusSize / 8.0f;
shape.Height = pilusSize * organelle.Scale.Length();

var parentMicrobe = organelle.ParentMicrobe;

Expand All @@ -66,7 +66,7 @@ protected override void OnPositionChanged(Quat rotation, float angle,
// parentMicrobe what is a pilus part of the collision
// pilusShape.SetCustomTag(PHYSICS_PILUS_TAG);

var transform = new Transform(physicsRotation, membraneCoords);
var transform = new Transform(physicsRotation, membraneCoords * organelle.Scale);
parentMicrobe.ShapeOwnerSetTransform(ownerId, transform);

parentMicrobe.AddPilus(ownerId);
Expand Down