Java-Gaming.org Hi !
 Featured games (84) games approved by the League of Dukes Games in Showcase (565) Games in Android Showcase (152) games submitted by our members Games in WIP (607) 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 4341 times) 0 Members and 1 Guest are viewing this topic.

Innocent Bystander

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

Hallo

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
« League of Dukes »

« JGO Overlord »

Medals: 948
Projects: 4
Exp: 16 years

 « 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: 15
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/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.

 Riven (10 views) 2015-04-01 18:27:05 ags1 (27 views) 2015-03-31 10:55:12 theagentd (13 views) 2015-03-27 23:08:20 wxwsk8er (54 views) 2015-03-20 15:39:46 Fairy Tailz (48 views) 2015-03-15 21:52:20 Olo (29 views) 2015-03-13 17:51:59 Olo (33 views) 2015-03-13 17:50:51 Olo (40 views) 2015-03-13 17:50:16 Olo (44 views) 2015-03-13 17:47:07 ClaasJG (61 views) 2015-03-10 11:36:42
 BurntPizza 21x LiquidNitrogen 21x KevinWorkman 18x EgonOlsen 17x basil_ 16x theagentd 16x Roquen 15x Varkas 12x wessles 11x 65K 11x Riven 9x Rayvolution 9x phu004 8x SHC 8x princec 8x Ashedragon 8x
 How to: JGO Wikiby Mac702015-02-17 20:56:162D Dynamic Lighting2015-01-01 20:25:42How do I start Java Game Development?by gouessej2014-12-27 19:41:21Resources for WIP gamesby kpars2014-12-18 10:26:14Understanding relations between setOrigin, setScale and setPosition in libGdx2014-10-09 22:35:00Definite guide to supporting multiple device resolutions on Android (2014)2014-10-02 22:36:02List of Learning Resources2014-08-16 10:40:00List of Learning Resources2014-08-05 19:33:27
 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