Projectile motion

how can i make a projectile in a canvas come from a sprite that can be anywhere to where the player clicks, nothing i try works

Canvas Touch event
ImageSprite MoveTo x/y

thanks i was over complicating if that works

What am I doing wrong i can't see the problem

oh wait wrong timer

that just teleports the ball

I gave you the basics. You did not explain what you wanted.

If you want to see the projectile moving from where it is to the touch point, You need to set the speed of the imageSprite and point it at the x/y coordinates of the touch.

Read the documentation

yeah that's what i was trying but nothing with the speed and heading worked

Show your blocks for that

ok i just gotta put everything like i had it before

This should get you started


Ok I'll change that when I can

Hello @TIMAI2, i want to ask you a physical detail of the name of this post. Projectile motion says.
In the example the motion -i think- is showed like a FLAT LINE, but as a projectile, all the projectiles in earth have a parabolic trajectory, so. How can we make to change the code to represent a REAL parabolic trajectory? I admit, It's only a doubt.
What must be added to represent the movement with this condition.
As always i give you my thanks for any clarification detail you can share.

When viewed from above the trajectory is a 'straight' line in this case. There is no elevation component. Even though in the real world a cannon fired will display parabolic movement when viewed at a tangent to the trajectory of the 'bullet', however if the displayed simulation is to show the motion on a flat map (the Canvas), the course will appear as a flat trajectory.

In my opinion the caption is correct but not necessarily a complete description of the course of the bullet as you point out German.

You might wish to look at the calculation and plot of a parabolic 'bullet' trajectory ( a simulation of the vertical movement of a cannon 'bullet' rather than the point to point course of the projectile as what was intended in the query I guess. :slightly_smiling_face: which is what you requested as code for a parabolic trajectory.

Hello @SteveJG .

Thank you for your comment. (My comment was rhetorical), off course you have the vertical (y) component , and in some ways, we have another forces like wind, dust in suspension, etc to add to the PROJECTILE MOTION.
I only make the comment to have IN MIND. THAT'S ALL. (IT'S MY GEOLOGICAL TEACHER INSIDE MYSELF, WHO ASK LIKE A TEACHER? Sorry for write the comment in that way. Maybe i could comment ONLY we can add a (Y coordinates) for make more real description of the projectile movement of the parabolic trajectory.
And AGAIN, thanks for add the google group text.

I still have a debt of Alfajores and Dulce leche, and we are counting 2 years.... or 3? I do not remember exactly, but it's counting..... :smiley: