You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@codingMASTER398 noticed that sprite.x and sprite.y getters are inefficient with sprites that have physics fixtures because every time they're used, p5play recalculates the sprite's position, converting from meters to pixels. Yet, this calculation only needs to be done if sprite.body.getPosition() changes.
@codingMASTER398 noticed that
sprite.x
andsprite.y
getters are inefficient with sprites that have physics fixtures because every time they're used, p5play recalculates the sprite's position, converting from meters to pixels. Yet, this calculation only needs to be done ifsprite.body.getPosition()
changes.Perhaps one day this could be done with Signals:
https://www.youtube.com/watch?v=JvE_xQVIFF0
But it could presently be done by with boolean flags that store whether the sprite's position was changed either by the user or
world.step
.The text was updated successfully, but these errors were encountered: