Ball Turrets
Moderators: winston, another_commander
Ball Turrets
I have been working on a ship on which I am trying to mount ball turrets. I have done this type of thing before with no problem, but this is acting way different. I have adjusted the Y numbers into the one-hundredths, but the ball will not center. It's wild, I'll lower it by a one one-hundredth of a decimal point, and it nearly drops off of the ship. If I boost it back up to where I just changed it, the ball ends up in a higher position than it was before. It will not center. Has anyone else run into this? I have the Z number pretty much exact, it's just the X numbers that are not cooperating. Any insights would be most welcome.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: Ball Turrets
I had a similar thing when converting the ball turret definitions from the 'old-style' subentity definition format to the 'new-style' subentity definition format. It was fixed by adding
Without the
Is that the problem?
type = ball_turret;
to the definition:Code: Select all
subentities = (
{type = ball_turret; subentity_key = "SiR-Turret-M"; position = (0.0, 21.0, -16.0); orientation = (1, 0, 0, 0); fire_rate = 0.25;},
{type = ball_turret; subentity_key = "SiR-Turret-M"; position = (0.0, 21.0, -16.0); orientation = (0, 0, 1, 0); fire_rate = 2.50;},
....
type = ball_turret;
they moved to weird positions around the ship.Is that the problem?
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Re: Ball Turrets
Also don't forget that a ball turret will rotate to try and track its targets. So if your model isn't properly centred when you create the obj file, then it could easily swing around all over the place.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Ball Turrets
I learned how to list ball turrets using the "new" style from the beginning, so it can't be that. As for being centered, I checked the ship position in Blender several times, and it's as centered as well as I know how to make it. I'll check again, though. Thanks.
Re: Ball Turrets
If you've got a ball turret model, then that will need to be centred as well I presume?
Re: Ball Turrets
Yeah, it has it's own ball turret model. I removed it from shipdata.plist. Too much hassle.
Re: Ball Turrets
It was the ball turret model I was referring to - that's the one that rotates about its centre to point toward its target. Hence if it's off-centre, then it'll still rotate about the origin of its model, hence it'll rotate in an arc.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Ball Turrets
Hmmm, I did mess with the front face on the ball turret a little. Suppose I screwed it up. I'll take a look at that. Thanks, Thargoid.Thargoid wrote:It was the ball turret model I was referring to - that's the one that rotates about its centre to point toward its target. Hence if it's off-centre, then it'll still rotate about the origin of its model, hence it'll rotate in an arc.
Re: Ball Turrets
What can I say. Thargoid, you nailed it again. I had the ball turret centered forward, and back, side to side, but I didn't check where it was up and down. The Y factor was clear out of whack, and when I got it centered all the way around, and made a new .dat from it, the ball turrets sat it place perfectly. I miss the stupidest things. It's a bit agravating. Thanks for your help.
- MiMoriarty
- Competent
- Posts: 39
- Joined: Mon Nov 14, 2011 1:03 pm
- Location: Madrid, España
- Contact:
Re: Ball Turrets
I'm in the same problem here. I've reused the same turret model i have in the Yasen, it worked pretty well in that ship so i imported the .obj file for the Lira model. I've the turret centered but it rotates to a weird arc when it's activated.
There is an art, it says, or rather, a knack to flying. The knack lies in learning how to throw yourself at the ground and miss. … Clearly, it is this second part, the missing, which presents the difficulties.
Blog http://mimoriarty.wordpress.com/
Blog http://mimoriarty.wordpress.com/
Re: Ball Turrets
I believe you are encountering quaternion problems with that. If you don't have the ball turret pointing in the correct direction using the quaternions, they may end up firing into your own ship, or not at all. At least, that's what I have discovered. How are you figuring your quaternion numbers?MiMoriarty wrote:I'm in the same problem here. I've reused the same turret model i have in the Yasen, it worked pretty well in that ship so i imported the .obj file for the Lira model. I've the turret centered but it rotates to a weird arc when it's activated.
- MiMoriarty
- Competent
- Posts: 39
- Joined: Mon Nov 14, 2011 1:03 pm
- Location: Madrid, España
- Contact:
Re: Ball Turrets
I've my ballturret model placed in Blender in a general file with all the the subentities and main hull. Then I made single files from this one. So the first ballturret has a quaternation of (0 0 0 1 0 0 0). After that I didn't found too many problems placing a second one.
There is an art, it says, or rather, a knack to flying. The knack lies in learning how to throw yourself at the ground and miss. … Clearly, it is this second part, the missing, which presents the difficulties.
Blog http://mimoriarty.wordpress.com/
Blog http://mimoriarty.wordpress.com/
Re: Ball Turrets
You got me. I'm no expert, but that quaternion string you showed isn't anything like I've ever used, but I still struggle with them to some degree as well. I think there should only be four numbers in that string. The angle of the turret, and the numbers representing the X, Y, and Z of the turret. Most turrets pivot on the X, and Y axis', and sometimes on the Z. Some of the most common quaternions I have come up with are 0 0 01, 0 1 0 0, or even 0.5 0 0.5 0, or some such configuration. It's usually the angle the turret is pointing out from the ship that screws up my equations.MiMoriarty wrote:I've my ballturret model placed in Blender in a general file with all the the subentities and main hull. Then I made single files from this one. So the first ballturret has a quaternation of (0 0 0 1 0 0 0). After that I didn't found too many problems placing a second one.
Re: Ball Turrets
I think what was posted is an old-style sub-entity definition string. If so, then it's X/Y/Z position ( 0,0,0 in the above) followed by the orientation quaternion (1 0 0 0 in the above, basically pointing along +z).
You are correct that a quaternion should be a 4-digit string.
You are correct that a quaternion should be a 4-digit string.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: Ball Turrets
WHSThargoid wrote:I know what was posted was the old-style sub-entity definition string. If so, then its X/Y/Z position (0 0 0 ... in the above) followed by the orientation quaternion (... 1 0 0 0)
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.