Kobuz
New Member
- Joined
- Apr 15, 2022
- Messages
- 6
- Reaction score
- 2
Hi, I recently came back to OT development and I’m having trouble implementing a smooth dash effect.
My idea is simple:
However, when I use:
Moving the camera by small increments (e.g., 8px) causes the screen to go black. The game only updates properly when I reach 32px, which I assume is when the camera position actually changes. It seems like the loop starts over again.
I also have an increased visibleDimension:

Can someone guide me on how to make this work smoothly? Or maybe it's ready solution in OTC?
Attaching camera to the player during teleport, just like when walking, would be the best option.
My idea is simple:
- Use setCameraPosition() on the player's current position. (so i can move camera maually)
- Teleport the player 3 tiles to the right.
- Move the camera smoothly 96 pixels to the right (with a 50ms delay).
- Call followCreature() to restore normal camera tracking.
However, when I use:
Code:
void movePixels(int x, int y) { m_mapView->move(x, y); }
Moving the camera by small increments (e.g., 8px) causes the screen to go black. The game only updates properly when I reach 32px, which I assume is when the camera position actually changes. It seems like the loop starts over again.
I also have an increased visibleDimension:

Can someone guide me on how to make this work smoothly? Or maybe it's ready solution in OTC?
Attaching camera to the player during teleport, just like when walking, would be the best option.