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

Conversation

CoreyHendrey
Copy link
Contributor

@CoreyHendrey CoreyHendrey commented Jun 5, 2020

Pilus physics size now takes into account the organelles scale.

There is a commit here that uses a really crappy debug mesh that matches the pilus physics cylinder (because no matter what I did I couldn't get Debug Collision Shapes to show the damn cylinder).

Small (no scaling):
image

Just before splitting:
image

Closed #1064

@CoreyHendrey CoreyHendrey requested review from hhyyrylainen, crodnu, a user and athariqk June 5, 2020 03:55
Copy link
Member

@athariqk athariqk left a comment

Choose a reason for hiding this comment

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

I'd say this works just fine from a quick testing

@hhyyrylainen
Copy link
Member

One worry with this that I have is that this impacts performance a lot. I think that adjusting the size is a good thing, but if each cell that is growing gets their pilus physics recreated each frame, that's not super nice. Instead I think that the pilus could also be made so that it doesn't change size when it grows and just keep the initial size adjustements from this.

@hhyyrylainen
Copy link
Member

The debug draw has been broken for cells from the start. I reopened the issue about that: #1095
I think that, that and a bunch of the other physics issues are caused by the same underlying reason.

@athariqk
Copy link
Member

athariqk commented Jun 5, 2020

Heh, didn't think of that. Well looks like those has to be fixed I guess

@CoreyHendrey
Copy link
Contributor Author

CoreyHendrey commented Jun 5, 2020

Yeah I could change it like that. It was adding the shape every frame before my commit though, but I agree with your reasoning. I'll try and make the Pilus not grow. Maybe it's best done by adding a "ShouldScale" flag to the organelles.

I seem your posts about the debug draw, pain in the butt! My solution works for very temporary testing purposes (adding a mesh and applying the same transforms that you apply to the CollissionShape). Will be great when all the physics stuff is sorted out.

@hhyyrylainen
Copy link
Member

It's definitely a bug if it is readding the pilus each frame, it should only add it again if the position where it should be changed.

👍 for organelle flag controlling if an organelle visually grows or not, should also be applied to the nucleus.

@CoreyHendrey CoreyHendrey requested a review from athariqk June 6, 2020 09:01
Copy link
Member

@athariqk athariqk left a comment

Choose a reason for hiding this comment

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

Seems good in-game no errors or anything

@CoreyHendrey
Copy link
Contributor Author

Ok - OnPositionChanged no longer gets called every frame. Hopefully this helps the flagella as well.

@CoreyHendrey CoreyHendrey requested a review from hhyyrylainen June 6, 2020 11:46
Copy link
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

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

Code is good. @Kasterisk could you recheck that gameplay still works?

@hhyyrylainen hhyyrylainen requested a review from athariqk June 6, 2020 11:47
Copy link
Member

@athariqk athariqk left a comment

Choose a reason for hiding this comment

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

It plays fine

@hhyyrylainen hhyyrylainen merged commit d6574f0 into Revolutionary-Games:master Jun 6, 2020
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.

Make pilus physics size match the visual size
3 participants