3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: Advanced Homing Missile prototype  (Read 4243 times)

jestermon

« on: January 30, 2011, 11:09:27 PM »
The Advanced Homing Missile prototype is an all putpose missile that can be fired from any vehicle, on the ground, in the air, and in space.
It can be placed anywhere on any vehicle with the localtoParent function (see the script), and linked to fire at any target, both skinmesh and rigidbody.

In this demo, the X hair appears on the screen when the target is in view, and the missile can be fired by pressing the Left mouse button. In this demo it is attached (NOT LINKED) to the car, and once fired, will home in on it's target.. another car in his case.

The missile is also "terrain hugging", which means if the target is behind some part of the terrain, it will actually climb over the terrain on it's way to the target.

This is a scripted prototype demo, to serve as an example and not a full plug- in.  A plug-in is on it's way.

V7.03

jestermon

« Reply #1 on: January 31, 2011, 12:47:01 AM »
V2: Added gravity explosions with particles
« Reply #2 on: January 31, 2011, 02:02:20 AM »
The project is sure to be fine for my space game !
Thanks  :) for another toy.
« Reply #3 on: January 31, 2011, 01:55:09 PM »
Very nice... Like a cruise missile. 

Would be very nice to see modified with a parabolic trajectory.  At least a launch phase parabola....

Great work as usual :)

jestermon

« Reply #4 on: January 31, 2011, 04:03:12 PM »
Would be very nice to see modified with a parabolic trajectory.  At least a launch phase parabola....

V3 release

I was using iQuaternionInterpolate(), which turns out to be a little screwy on first round calculations (Hence the homing delay in V1 & V2), So I went back to the drawing board, and used the rotation to target calculation from my original guided missile in the Elite library (which is based on Fernando's RobotAI demo). This sorted out the problem, and allowed me to do what I wanted to do in the first place, namely add guidance with my localToParent function.

Anyway, here's V3, which gives a much more realistic parabolic trajectory, since it's managed on the missile's own axis reference, as apposed to a wold axis reference.



« Reply #5 on: January 31, 2011, 05:22:20 PM »
That is really cool.  8)

Nice work as always, Jes.
« Reply #6 on: January 31, 2011, 06:52:24 PM »
that's quite incredible...

thx Jes for another useful addon for our games...

--Mike

« Reply #7 on: January 31, 2011, 08:43:53 PM »
Way awesome! In ODE I used to actually joint my missiles to an rb the unatachthem, so physX is kinda pissing me off now with the crappy joints.
I'm never here and if I am I will try and say something...
Sorry tramkp888 I kind of forgot you back in July

jestermon

« Reply #8 on: January 31, 2011, 10:20:05 PM »
Way awesome! In ODE I used to actually joint my missiles to an rb the unatachthem, so physX is kinda pissing me off now with the crappy joints.

Neat idea, using RB's

I know you are not seriously into scripting, but from reading some of your stuff, you should be able to do some fun stuff by adding a RB to  the missile

LocalToParent(MISSILE,RB,Vector3(0,0,0),Vector3(xpos,ypos,zpos));  Add this anywhere in the main
MISSILE is the missile skinmesh
RB is some RB that you add to the script
xpos is left or right offset, probably 0 for a missile
ypos is up or down offset, probably 0 for a missile
zpos is forward or backward offset, depending missile scale, between 1 to 2 should place the RB on the tip of the missile and fly with it. Just make it small enough to hide inside the tip

Now set collision links between the RB in used in the script, and any target, then you can use EventOn's to do non-scripting stuff when it slams into the target.

I'll add this idea to the plug-in, thanks for the idea :D
« Reply #9 on: February 01, 2011, 09:33:48 AM »
That ROCKS ! 8)
I'm Running . 3DRad 7.22 and LUVIN IT !  8-)

Check out http://www.Zpokerplayhouse.com
« Reply #10 on: February 02, 2011, 08:20:09 AM »
 :o Wow.
I'm never here and if I am I will try and say something...
Sorry tramkp888 I kind of forgot you back in July
« Reply #11 on: March 01, 2011, 08:21:10 AM »
Im playing with this project and have a question... if i use event on contact to count 'hits' how can i do this without a rigidbody in the missle skinmesh ??? ..when i add one to it, the missle no longer takes off after the target.
I'm Running . 3DRad 7.22 and LUVIN IT !  8-)

Check out http://www.Zpokerplayhouse.com

jestermon

« Reply #12 on: March 01, 2011, 01:11:39 PM »
That's the problem with doing things completely with scripts, is that it is not always possible to do the "link object" way. You can of course attach a RB to a skinmesh bone, if it has one, then that should work. Bit the missile has no bone, so that won't work in this case. If you attach the skinmesh to a RB, then the RB is in control, and the script loses its control... In this specific case.
So you can make a global variable ..

float score = 0;

then change the lines in the script like so

if(distance < 3){
   missileFIRED = false;


if(distance < 3){
   score++;                  //add this line to the script, to increment the score
   missileFIRED = false;

Then you can print out the score with a valueprint or a textprint.

hope this helps
« Reply #13 on: March 01, 2011, 02:24:40 PM »
Thank You jestermon... I'll give  it a shot! 8-)
I'm Running . 3DRad 7.22 and LUVIN IT !  8-)

Check out http://www.Zpokerplayhouse.com

jestermon

« Reply #14 on: March 01, 2011, 04:57:27 PM »
Thank You jestermon... I'll give  it a shot! 8-)
That's a missile, you launch it, not shoot it.. lol
Pages: [1] 2