Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
36.94k
stars
7.08k
forks
source link
Resetting a static body should reapply the offset #6729
Closed
samme closed 7 months ago
Version
Description
Create a game object with a static Arcade Physics body. Give the body an offset with
setOffset(x, y)
.Reset the body with any coordinates. Now the body position doesn't include the offset.
Call
setOffset(x, y)
again. The body position is the same — still no offset.Example Test Code
Also https://codepen.io/samme/pen/wvOjoGK?editors=0010