![]() ![]() I've pasted the constructor in here, but it'll likely be easier to read if you click on the link or if I could get code formatting to work on here or KA's main site. If you nest functions inside of a function then it would be considered a constructor. Was a nice vector library, however he should have done it as a single constructor. If I'm jacking it up on syntax and it is viable then please let me know. needs to be a better way than me manually calculating everything. Shows all these as viable functions of vectors. so I could put it in a function for shooting, even tried tMag(20) I was simply told that it wasn't a function. ShotTrajectory = location.add(mouseX, mouseY). I then attempted to start implementing what I learned by typing Velocity.Limit(5) or create a vector to create a target trajectory by using ![]() I took notes and everything.Īt this point I've created the var player = new PVector(x,y) etc for player, velocity, location, acceleration and target. I dedicated a couple of hours of watching videos outside of Khan Academy because there was a lack of documentation on PVector. However, I was 6 episodes by "The Code Train" on Vectors and found myself trying to impliment it into the code of a program. So I was on youtube today and I was greatly interested in PVector. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |