Projectile

Your browser needs java to view projects. Click here to install Java.

user_icon EdnaC shared it 1 year, 10 months ago
228 views, 1 tagger, 4 people love it, 1 remix by 1 person, 41 downloads, in 4 galleries
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
byi byi 10 months, 3 weeks ago

dude. wow. i could never figure it out. i have a tank game that uses imperfect projectile motion. im gonna fix it up and give u some credit.

jessman jessman 1 year, 7 months ago

truthfully, i'm jealous i didn't figure this out; it's so simple yet works so effectively.

jessman jessman 1 year, 7 months ago

this is incredible. i mean seriously. and that means a lot

EdnaC EdnaC 1 year, 8 months ago

mariotor, Look back at my first comment, it explains how this project was done. The concept is hard to desribe in words, but it really isn't difficult to do. (I'm an engineer, and need a pencil and paper to communicate effectively.) The same idea was used for the "MoonLander" project.

mariotornado mariotornado 1 year, 8 months ago

Hi EdnaC! I love your project! How did you do it? Did you use the X and Y scripts to help you make the projectile move and did you use broadcasting to help you along with move step scrips? Any way great project! :)

EdnaC EdnaC 1 year, 8 months ago

You may want to have a look at "ProjectilePhysics". That one uses trig (and the classic physics equations). There are also some good demos out there that help to explain trig. There a quite a few projects that "emulate" trig by using a guide sprite that goes to the origin and moves by "one" in the direction of interest. That guide's x and y position then report the sine and cosine of the direction.

eagle6 eagle6 1 year, 8 months ago

And now that I've figured the guide sprite out, I finally discocer that Scratch does have Trig in it. Who'd have known it's hiding in the squareroot script?

EdnaC EdnaC 1 year, 9 months ago

I'm glad it helped. When this was made, Scratch had just gotten trig, and I'd gotten used to doing without. Trigonometry is very useful for many things, but confusing if you haven't had some "schooling" in it. For projectile motion, a guide sprite works really well, and it's pretty easy to see what is going on; send the guide in the direction you are heading, then have it move in the direction that gravity is pulling, and finally, point toward the guide and go to where the guide is, then repeat. The result of the "time step" simulation in this project is the same as the "real" physics equations. The difference is that the equations can predict the highest point and the impact distance without "simulation" of the entire flight.

eagle6 eagle6 1 year, 9 months ago

Thanks for this. I could not figure out how to do a program like this without using the trig functions.

Please Wait...