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 / 3D Turret algorythm help wanted

Author
Message
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 12th Dec 2003 02:25 Edited at: 12th Dec 2003 02:28
First off, I'm using DBClassic.

How would one go about making a turret that can track the player in 3D in real time? I'm still trying to grasp basic limb/animation functionality while I'm thinking of how to implement this. If I make a body and head and tell the head to rotate, and then tilt up or down towards a given direction, it head goes the opposite direction if the head is rotated backwards from it's original position. I also tried making a model with three meshes - the body, the neck, and the head. The neck would rotate, and the head would tilt, but I was frustrated by failure. Could anyone please help me get this turret idea off the ground?

EDIT - Also: The limbs also never rotated along an appropriate axis. I tried to look and see if you could define the pivot points, but there ain't any. Is this possible?

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
guru of boredom
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: middle of no where
Posted: 12th Dec 2003 04:49
i think that this is because limbs use a differents rotation system but i am not sure. You could just use different objects if the limbs are giving u problems. I will see if i can find what wrong when i get home from school.

we are not outnumbered! we are just in a target rich enviroment!
P4 2.4 ghz 120 GB 256 mb GeForce4
Andy Igoe
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 12th Dec 2003 13:53
Quote: "EDIT - Also: The limbs also never rotated along an appropriate axis. I tried to look and see if you could define the pivot points, but there ain't any. Is this possible?"


The limbs use the same rotational system as objects, your example is not working and I believe it is because the pivot points and possibly limb heirarchy are not set up correctly. Let us check your media to confirm this, or use a known good example.


God created the world in 7 days, but we're still waiting for the patch.
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 12th Dec 2003 17:30
@ Andy Igoe

Well, after the experiments I ran last night, I think you are definately correct. I'm modelling in Wings; I do not know how to set up the mesh hierarchy necesssary to do what you are describing. Anything I can do in wings to solve the problem?

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 12th Dec 2003 21:43
Furthermore, once I get the heirarchy set up, how would I go about getting the "head" of the turret to track the player effeciently?

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Proteus 1935
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Brazil
Posted: 12th Dec 2003 22:28
I've coded this function a long time ago (I remember it used to work) so maybe you can extract something out of it



Currently coding: Massive collision system
Recent coding: An allegro game
Proteus
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 13th Dec 2003 04:28
The code looks good. However, I'm afraid I'm not going to able to use it until I can understand how to set up an appropriate limb-hierarchy with the modellers I'm using. I'm using Wings3D and can't seem to figure out how to perform this task.

How do you set up the limb- child limb relationship needed?

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Proteus 1935
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Brazil
Posted: 13th Dec 2003 14:23
Well lets see, I've always been curious about Wings3D but never used it... I'll download it and see if I can answer you

Currently coding: Sector Divided Collision
Recent coding: Massive collision system
Proteus
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 13th Dec 2003 15:00
Yeah, I've been confused about wings limbs, there seems to be limbs with exported models, but there is no way to attach them in wings itself

Do you bite your thumb at me sir?

Athelon XP 1600 Plus - Nvidia Geforce MX400 - 256mb RAM
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 14th Dec 2003 00:17
Well... I also have Truespace 3.2, but I've never found a genuine use for it yet. Is there a way to set up the limb stuff in Truespace?

I'll be posting my question about Wings in the 3D chat section.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 14th Dec 2003 22:27
A little note about limbs in DBC(not sure about pro), The limbs rotate but not on the normal "world" axis. They rotate in orentation to the parent limb, also i've noticed their are two kinds of rotation in DBC, diferent commands use differnt ones and if you don't know what your doing the objects will rotate the wrong way, you can switch these rotations with the "set object rotation zyx objnum" or "set object rotation xyz objnum", the xyz one is the default. Good luck.

CPU

Sparring - Loved by many, Pefected by few.
I'm going to live forever, or DIE IN THE ATTEMPT!!!"
>>>>> Check out my alienwhere progress in the W.I.P folder! <<<<

Login to post a reply

Server time is: 2025-05-22 04:15:47
Your offset time is: 2025-05-22 04:15:47