My initial thoughts are that you’d want to draw a line from the previous mouse/touch point to the current one. It wouldn’t be very smooth, but it’s a start.
Once that is working, you can extend it to draw a Bezier curve using the last 3 or 4 touch points.
I just checked your link. This appears to be what the app is doing. If you quickly swirl the mouse around on the screen, you’ll see there are straight lines making up the doodle. As soon as you release the mouse button, it smoothens it out.
You could use the shape painter object. But, I don’t know how easy it would be to use it as a drawing tool.
But, it is pretty easy to make lines and shapes with it.
Link to the wiki: Shape painter object [GDevelop wiki]
Yeah, because you’re creating NewObject right under your mouse pointer, and then drawing from that to the mouse pointer. Which is where NewObject is.
Instead, you’ll need to :
Create scene variables to keep track of the previous mouse position.
Draw from previous mouse position (from the scene variables) to the current mouse position.
Set the previous mouse position to the current mouse position (at the end of all the events).
In the Drawing Shape object, uncheck the box “Clear the rendered image between each frame.”
Also, to use the bezier functionality later on, you’ll need to keep track of all the points generated while the mouse button is down. You then have to traverse this list and use the points to apply the bezier curve function.
That last bit is a lot trickier, and if you get stuck I’d suggest posting a new thread for help.
I use Aww Whiteboard if I am showing something live because I think its easy to use and has good drawing tools.
I write and draw anything with xp-pen ( https://www.xp-pen.com ) graphics tablet , The drawing tablet works great for digital writing with whiteboard apps .