When my character collides with a slanted collisionmap due to ssmart move, it often causes the character sprite to shake and switch rapidly. I suspect that this is a problem with the collision detection (or perhaps the camera?).
So, I made some modifications in the qmovement plugin:
Crtl+f,find:smartMoveDir8
if (!pass) return;
var radian = QPlus.adjustRadian(Math.atan2(y2 - y1, x2 - x1)); this._forwardRadian = radian; (delete this row)
this._px = x2; this._py = y2;
this._realPX = x1; this._realPY = y1;
this._adjustFrameSpeed = false;
this.setRadian(radian); (delete this row)
this.increaseSteps();
In this way, the character sprite no longer switches when colliding with tilted collision tiles, but smart movement still works .
However, the second issue remains, which is the shaking of characters on the screen. I haven't been able to find a solution for this.
I encountered a similar problem when experimenting with screen zoom events, and I was able to solve it by adjusting the camera.
I'm not sure if this issue is also related to the camera.
Does anyone know how to resolve it? and here are some similar cases for reference.
So, I made some modifications in the qmovement plugin:
Crtl+f,find:smartMoveDir8
if (!pass) return;
var radian = QPlus.adjustRadian(Math.atan2(y2 - y1, x2 - x1)); this._forwardRadian = radian; (delete this row)
this._px = x2; this._py = y2;
this._realPX = x1; this._realPY = y1;
this._adjustFrameSpeed = false;
this.setRadian(radian); (delete this row)
this.increaseSteps();
In this way, the character sprite no longer switches when colliding with tilted collision tiles, but smart movement still works .
However, the second issue remains, which is the shaking of characters on the screen. I haven't been able to find a solution for this.
I encountered a similar problem when experimenting with screen zoom events, and I was able to solve it by adjusting the camera.
I'm not sure if this issue is also related to the camera.
Does anyone know how to resolve it? and here are some similar cases for reference.