Skip to content

Removed warning if scale=1,1,1 in CylinderCollisionShape#512

Merged
empirephoenix merged 1 commit into
jMonkeyEngine:masterfrom
riccardobl:pr200616
Jun 21, 2016
Merged

Removed warning if scale=1,1,1 in CylinderCollisionShape#512
empirephoenix merged 1 commit into
jMonkeyEngine:masterfrom
riccardobl:pr200616

Conversation

@riccardobl
Copy link
Copy Markdown
Member

@riccardobl riccardobl commented Jun 20, 2016

That method just prints a warning, so from my point of view there is no reason to leave the call there.
EDIT: I want to point out that this is an issue because when cylinder shapes are created frequently the logs are polluted with warnings about scaling when the developer isn't actually trying to scale the shape.

See below.

@empirephoenix
Copy link
Copy Markdown
Contributor

Agreed, both jbullet and native bullet just print a warning no need to trigger this manually.

However I would propose instead to check in the setScale if the new scale is not 1,1,1. That way ay generic handling of collision shapes would not generate warning if they are not actually trying to change the scale.

@riccardobl
Copy link
Copy Markdown
Member Author

riccardobl commented Jun 21, 2016

Yeah, good idea.
I've updated the pr and applied the change also to jbullet.

@riccardobl riccardobl changed the title Removed call to setScale in CylinderCollisionShape.createShape Removed warning if scale=1,1,1 in CylinderCollisionShape Jun 21, 2016
@empirephoenix empirephoenix merged commit e4840e2 into jMonkeyEngine:master Jun 21, 2016
@empirephoenix
Copy link
Copy Markdown
Contributor

thanks

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