• Javelin missle.
    39 replies, posted
[QUOTE=PacX;20267816]Wait, what... Has this taken you 3 weeks? It's such a simple formula to get an parabolic arch to fly to your target [B]only[/B] with V2:distance(V2). That together with a slight bit of trigometry you can make it even better.[/QUOTE] well i am still only in 8th grade geometry. trig is next year. plus i haven't been constantly working on it. ive had other projects ive been working on. but if you could break down what you are trying to say so i can use it, that would be great. [editline]01:20PM[/editline] [QUOTE=PacX;20267816]Wait, what... Has this taken you 3 weeks? It's such a simple formula to get an parabolic arch to fly to your target [B]only[/B] with V2:distance(V2). That together with a slight bit of trigometry you can make it even better.[/QUOTE]
Im doing trig this year, I find it quite confusing o.o
I'm in the 7th grade of public school yet I learned my self basic trigonometry more than a year ago. FffffFFffFffFffFFf Simple method for parabolic arch below V [code] @inputs [Tar Vec]:vector @outputs Z Z = vec2(Tar):distance(vec2(Vec)):length() + Tar:z() [/code] You transform the coordinates into 2D vectors, thus allowing you to get distance from A to B without the Z axis crippling the thingy. Vec is your current position of the projectile, Tar is obvious and Z is the height you want, now go! go and make something!
[QUOTE=PacX;20272499]I learned my self basic trigonometry[/QUOTE] ... I hate seeing this thread
[QUOTE=PacX;20272499]I'm in the 7th grade of public school yet I learned my self basic trigonometry more than a year ago. FffffFFffFffFffFFf Simple method for parabolic arch below V [code] @inputs [Tar Vec]:vector @outputs Z Z = vec2(Tar):distance(vec2(Vec)):length() + Tar:z() [/code] You transform the coordinates into 2D vectors, thus allowing you to get distance from A to B without the Z axis crippling the thingy. Vec is your current position of the projectile, Tar is obvious and Z is the height you want, now go! go and make something![/QUOTE] hm. would z be the apex? or the final height. also i just havent taken the time to learn trig, as i have no time with the shitloads of crap my teachers assign. my math teacher gives about 20 proofs each night, and for english i have tonight to write an essay (not procrastinating she gave it to us today). plus i cant play during the week, and very little on the weekend. thanks for helping though
Final height. It will give you an arch over to the target, you can also max the Z so it works better for smaller maps.
k cool [editline]12:58PM[/editline] though one prob is that a javelin doesnt have a parabolic arc. it is more sudden like a triangle.
Yea, this is a basic solution.
You could throw something together to just add to the z vector until within a certain distance of the target and then come down on it by matching the z up to the target again. Something like if Distance > 500 {Z = Z + 200} else {Z = Z} Z being the Z coordinate of the target. Dunno, just started reading up on E2 today, that's probably wrong but hopefully gives you the right idea. Obviously, even if this was correct, you'd have to play around with the values until you found something you liked... and obviously, "Z + A" can never be higher than "Distance > B" or it will just float above the target lol. Oh yeah, I checked Unsmart's code, it definitely has what you're looking for. Link: [URL]http://www.wiremod.com/forum/contraptions-saves/18046-release-holo-javelin-rocket-launcher.html[/URL] I hope you don't mind me linking it here... cool shit there Unsmart, I had a hell of a time getting it to work though, but the only other person I've seen use these is Arc and he doesn't share his stuff, so we do what we can.
! unsmart i found a solution to your problem. if i added a high multiplier it could make the arch higher but also if you looked at the code i am using Ent:applyForce(Ent:forward()) for realism. so this wouldnt work for this.
Sorry, you need to Log In to post a reply to this thread.