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 Discussion / Offsetting an object from an aircraft?

Author
Message
MoonSon
22
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 1st May 2003 17:24
I have an object that behaves like an aircraft using PITCH and ROLL commands for control. I now want to offset an object from my aircraft, but it also needs to move with my aircraft when it rotates so it appears to be in a fixed position.

Has anyone actually done this and got it to work because i would love to know how, as I am really stuck with this? Code would really help too!

Tanks
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 1st May 2003 19:47
Lookup 'glue object to limb' in the help

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Coder Bob
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: United Kingdom
Posted: 1st May 2003 19:49 Edited at: 1st May 2003 21:08
I did something similar just the other day, i did it like this

position object 99,object position x(101),object position y(101),object position z(101)
set object to object orientation 99,101
turn object left 99,90
move object 99,30
turn object right 99,90

this places the missile or whatever in the same place and direction as the aircraft with a slight offset, you will have to sort out the offset yourself by trial and error.

Coder Bob
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: United Kingdom
Posted: 1st May 2003 22:03
Ok never mind my previous post attached is some code to implement the glue object commands. just a cube with 2 boxes attached but you can shoot em.

MoonSon
22
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 1st May 2003 22:43
Thats great! Nice little demo too

I'll give this a go, thanks guys.

Login to post a reply

Server time is: 2025-05-17 18:54:43
Your offset time is: 2025-05-17 18:54:43