Java-Gaming.org Hi !
 Featured games (88) games approved by the League of Dukes Games in Showcase (681) Games in Android Showcase (196) games submitted by our members Games in WIP (744) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 Home Help Search Login Register
Pages: [1]
 ignore  |  Print
 How to calculate a missles flight path? Splines?  (Read 4815 times) 0 Members and 1 Guest are viewing this topic.
Ladnaks

Innocent Bystander

 « Posted 2010-04-08 15:14:10 »

Hallo

First, please excuse my bad english.

I am currently making a Java3D game. In this game thera are missles from which I know the start point, the endpoint and the angle at the start point. In a physics book I found a fromula to calculate the flight path. But in some Java3D tutorials I read something about splines which should be more efficient than calculating the current position of the missile with the physic formula.

Currently I am confused about this splines. For what I understand I need some points and a spline interpolates the points between the points I know. Can I just calculate some points of the flight path with the formula and then interpolate the flight path with a spline function?
Riven
Administrator

« JGO Overlord »

Medals: 1220
Projects: 4
Exp: 16 years

Hand over your head.

 « Reply #1 - Posted 2010-04-08 16:37:22 »

Splines can only be used in very few cases.
They are almost unusable for any simulation.

Just use your physically correct formulas, I doubt it will hurt performance, unless you launch thousands of missiles.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
moogie

JGO Ninja

Medals: 16
Projects: 6
Exp: 10 years

Java games rock!

 « Reply #2 - Posted 2010-04-08 21:05:45 »

perhaps pursuit steering behavior would be sufficient?

http://www.red3d.com/cwr/steer/PursueEvade.html
http://www.red3d.com/cwr/papers/1999/gdc99steer.html

just extend it to 3d

Java4k RIP 2014
 Games published by our own members! Check 'em out!
Ranger
 « Reply #3 - Posted 2010-04-10 21:22:00 »

Easiest way I found was to give the missile thrust, and then steer it left and right.  To work out the path, just iterate forward in time.
Pages: [1]
 ignore  |  Print

You cannot reply to this message, because it is very, very old.

 CopyableCougar4 (32 views) 2016-06-25 16:56:52 Hydroque (67 views) 2016-06-22 02:17:53 SwampChicken (69 views) 2016-06-20 13:22:57 SwampChicken (68 views) 2016-06-20 13:22:49 SwampChicken (64 views) 2016-06-20 13:22:26 Hydroque (109 views) 2016-06-15 08:22:50 Hydroque (101 views) 2016-06-13 06:40:55 DarkCart (224 views) 2016-05-29 02:30:33 Hydroque (186 views) 2016-05-26 14:45:46 Mac70 (179 views) 2016-05-24 21:16:33
 Spasi 49x theagentd 44x NegativeZero 39x KaiHH 28x LiquidNitrogen 23x princec 20x kingroka123 15x ags1 15x CoDi^R 15x ra4king 13x Opiop 10x Hydroque 9x purenickery 9x Archive 8x SHC 7x czak 7x
 Making a Dynamic Plugin Systemby Hydroque2016-06-25 00:13:25Java Data structures2016-06-13 21:22:09Java Data structures2016-06-13 21:20:42FPS Camera Tutorialby Hydroque2016-05-22 05:40:58Website offering 3D Models specifically for games for freeby vusman2016-05-18 17:23:09Website offering 3D Models specifically for games for freeby vusman2016-05-09 08:50:56Website offering 3D Models specifically for games for freeby vusman2016-05-06 11:10:21Website offering 3D Models specifically for games for freeby vusman2016-04-29 12:56:17
 java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org