Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Missiles "on plane" then "Fired"

Author
Message
kryo
15
Years of Service
User Offline
Joined: 13th Jan 2011
Location: On the web.. were are your?
Posted: 29th Mar 2011 23:47
What I have is 4 missiles on a planes wings. What I want is when I move they stay in position and rotation with the plane until I fire
They switch in alteration like a normal plane would or close to it.
1324 -2-1-||-3-4-

I don't have any code for this because I tried several ways like

Quote: "1. limbs
2. lock object
3...and more"


limbs -> my missile is rotating everywere when my plane turns (not with the plane)

lock object -> good almost but it shoots in weird directions instead of facing weird and shooting that way...

I just want someone to give me steps to help me through so i can learn this...
If want you can put code but explain it unless its easily understandible.

Thank you for your help ahead of time

Can't do it revise, check, and check again
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2011 00:13
Make a separate object like a small cube, and make that your new limb at the mount points.

Then use Glue Object to Limb to attach the missiles.
When it's time to fire, just unglue and start moving your missile.

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 30th Mar 2011 00:47
Ehm... limbs rotating uncontrolled?

Well, you shouldn't rotate the limbs (rockets) themselves, if you rotate the main object which they are attached to... not only the position is hereditary between the main object and its limbs, but everything else as well.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 30th Mar 2011 02:05 Edited at: 30th Mar 2011 02:06
I guess I have to be the guy to bring in the math...
You could also take the plane position and position the missles at that position, then offset it it with Cos for the X and Sin for the Z


KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2011 02:21
It's still easier to just place a hidden limb on the plane's mount points. Then all you have to do is orient the missile with the plane, then glue object to limb. When you unglue it the missile stays at that orientation and you can start moving it. No math needed, and it's very simple.

kryo
15
Years of Service
User Offline
Joined: 13th Jan 2011
Location: On the web.. were are your?
Posted: 1st Apr 2011 00:46
what i mean by limbs uncontrolled is they point at 1 direction when i move my plane not where my plane is pointing....
Ill try all of these out thanks guys ill report back in as soon as i can.

Can't do it revise, check, and check again
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 1st Apr 2011 02:21
I should have been more specific. Sorry.

Here is the process I used to attach cargo pods to my ships in Worlds Apart Online.

- Make a small cube
- Make a mesh from it
- Delete the cube
- Attach the mesh as a new limb (Matrix1Utils Add Limb command)
- Hide the limb
- Position the limb using Offset Limb putting it at the mount point for your missile
- Then when you want to attach a missile you just
set object to object orientation Missile, Plane
glue object to limb Plane, MountPointLimb, Missile

The missile will stay where it is on the plane. It shouldn't turn independently of the plane at all. When you are ready to fire, just unglue object from limb, and then move the missile using whatever method you are using for that.

It's quick, simple and effective.

In fact, you could even place the limbs in your models before you ever load them. That's the way FPSC does it with weapons. Give your limb a meaningful name in your modeling program, and then attach the missile to that limb.

Hope that helps.

kryo
15
Years of Service
User Offline
Joined: 13th Jan 2011
Location: On the web.. were are your?
Posted: 5th Apr 2011 23:41
Thank you everyone for your help and input i hope this can help anyone else who doesnt know how to do this.

Can't do it revise, check, and check again
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 6th Apr 2011 18:11
Did you get it worked out? What method did you finally use?

kryo
15
Years of Service
User Offline
Joined: 13th Jan 2011
Location: On the web.. were are your?
Posted: 12th Apr 2011 00:01
Oops... I used the glue object to limb 1

1.make cube
2.make it a mesh
3.make it a limb
4.delete the cube
5.offset mesh
6.set object to object orientation
7.glue missiles to the new limb(mesh)
8. unglue missile when firing
(if needed move missile a - amount instead of +, or re-export plane by rescaling it along the length of the plane)

Can't do it revise, check, and check again
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Apr 2011 01:56
Nice.

Login to post a reply

Server time is: 2026-07-17 22:13:17
Your offset time is: 2026-07-17 22:13:17