|
| |||||||
| Wiremod Tutorials Post your wiremod tutorials/guides here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Advanced Member ![]() Join Date: Aug 2008 Location: San Diego, Kalifornien
Posts: 107
![]() | I know it may be simple, but I'm building helicopter and I want a turret (With Cam Controller) for my gunner seat. I would like it to be controlled by looking where the gunner would like to shoot. It would be nice if it had higher friction so it didn't just spas around and 10 seconds later level out enough to hit them. An expression will be nice, or just an adv_dupe of one that's been built. P.S. Ill be releasing my heli soon (Even though it can't be compared with Generics :'( ), and ill give you credit for your work. Thank You. (Danke schon)! |
| | |
| Sponsored Links | |
| | #2 (permalink) |
| Member ![]() Join Date: Feb 2008 Location: Spain
Posts: 65
![]() | You know that the adv. pod controller has an X Y and Distance (if i dont remember badly) outputs that are where you are looking at? I mean, what you only have to do is to link that to something that points that coordinates. To write an expression its difficult if we dont know how does your turret move, like if its based on thrusters/hydraulics/... and usually to do that you need some kind of mistake-correction for the constatn values. |
| | |
| | #3 (permalink) |
| Advanced Member ![]() Join Date: Aug 2008 Location: San Diego, Kalifornien
Posts: 107
![]() | Like, I would like it to use thrusters because they seem like a more realistic way of moving, and have the axises have friction of like 20, so that way it stops when theres no thrust |
| | |
| | #4 (permalink) |
| Newbie ![]() Join Date: Mar 2008
Posts: 21
![]() | I don't know if you still need this or not, but I will try to see how you are going with this tell me if this is Close to your turret: Metal plate axis onto somewhere on the helicopter and then you can have a ball-socket plate (E.G. -Orb-'s Turret) with a hydraulic on it. HTML Code: Expression: N@Heli turret Controls -- You can name it whatever I@Accum Bearing Elevation Active O@Run Reset Hydraulic Thrust Elevation > 0.01 -> Verticle = 1; Elevation = 0 -> Verticle = 0; Elevation < -0.01 -> Verticle = -1; Bearing > 0.01 -> Thrust = 1; Bearing = 0 -> Thrust = 0; Bearing < -0.01 -> Thrust = -1; Hydraulic = Accum Over = (Accum > 75 ? 0:1) --So to not flip Run = (Verticle * 15)*Over Line10:Reset = (Active < 0 ? 1:0) -- Turret resets when your not in
__________________ Wiremod - once you have it, you love it. When In Doubt, Wire it. You cant prove i did it, unless it was me ![]() All of my Wiremod Tutorials I have an IQ of 138 |
| | |
| | #5 (permalink) |
| Wire Guru ![]() Join Date: Apr 2008
Posts: 420
![]() | I got an idea, have the turret be remote controlled, just do turret-gyro +- pod controller then put a camera or cam controller on the turret. Edit: Yay someone supports my idea . Also use hud indicator to make crosshairs.
__________________ ![]() (\__/) Wiremod Chinoto's Tutorials and Tutoring (Go here for "in-person" tutoring) (='.'=) ABX Chinoto's Wire Tutorials (Text tutorials so far) (")_(")<- Put this bunny in your sig and help him to rule the world. (My first internet infection) Last edited by chinoto; 10-23-2008 at 07:49 PM.. |
| | |
| | #6 (permalink) | |
| Newbie ![]() Join Date: Mar 2008
Posts: 21
![]() | Quote:
__________________ Wiremod - once you have it, you love it. When In Doubt, Wire it. You cant prove i did it, unless it was me ![]() All of my Wiremod Tutorials I have an IQ of 138 | |
| | |
| | #8 (permalink) |
| Kanguru ![]() ![]() | He was building a helicopter, not a ship. And isn't a -1 consten a ship anyway? When you don't have more to add then a vetor thruster and "I have a idea but I won't say it now, noo, you need to ask it first..." crap, Then don't bump a 2 months old thread. |
| | |
| | #9 (permalink) |
| Newbie ![]() Join Date: Dec 2008
Posts: 21
![]() | I made a GPS/Gyro Expression chip which I could simply stick on things if i wanted their GPS and/or Gyro data. Stick it onto your heli turret, so whenever your turret points at something, so does your camera. I havent yet found a way to stabilize the camera, so if you move very fast, the cam will lag behind. I guess you could use a speedometer or something to output your speed and then use some multiplication and addition formulae to calculate the position addition to the GPS/Gyro position. That means something like for example, moving on X axis, the camera lags behind on the X axis, thus when moving on X axis, the camera position on X axis will equal its default position plus some value determined by speed: NewXPos = ($Speed * 10) + DefaultXPos Be noted that I threw in $Speed (delta speed) which was made clear to me with the example on pancakes in another topic, which in this context would make the camera position dependant on speed in fine detail. As you move into 2 dimensional system, it gets a bit more complicated, and I even wont talk about 3D yet. I wonder if... NewXPos = ($Speed * 10) + DefaultXPos NewYPos = ($Speed * 10) + DefaultYPos ...would cut it. I doubt it though. Anyways, the GPS/Gyro in one: N@GPS/Gyro I@ O@ X Y Z Pitch Yaw Roll interval(20) X = extposx() Y = extposy() Z = extposz() Pitch = extangp() Yaw = angnorm(extangy()) Roll = extangr() EDIT: Be noted that you somewhat can't use Tricky-s Gyro stabilizer for your turret, so its movement will be quite hectic, which quite aint good in terms of increasing the accuracy, should you consider manouver your turret with thrusters. Last edited by Rahvasaadik; 3 Weeks Ago at 03:12 AM.. |
| | |
| | #10 (permalink) |
| Advanced Member ![]() Join Date: Feb 2008
Posts: 139
![]() | What? Are you all insane? Just use a turret with a vector thruster on the end which has the input of @inputs Pilot:entity @ouputs Thrust:vector Thrust = Pilot:eye() It will look to where you are. (with the offset of the distance vector from you to the turret) Offset will be close to 0 if you are doing it with a cam controller. Use the adv pod controllers elev/bearing to control the cam. Alternatively you can use the Pilot:eye() to do that aswell, although its a bit harder.
__________________ |
| | |
| Sponsored Links | |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|