Random Code Drabbles

  • 1
  • 2
18 posts Page 2 of 2
PacoMontanes
Posts: 14
Joined: Mon Feb 09, 2015 2:35 pm
by PacoMontanes » Thu May 26, 2016 10:11 am
JeffR wrote:What'd be the control/implementation for wire-guided though? That's a bit more broad category, so I'm not sure the exact setup you had in mind. Being able to lock onto a target and have the missile steer towards it?

In fact, camera-guided missile needs a wire too (fiber optics), to transfer control and video image from the camera. An old/common approach solution of wire-guide missile is a control by the launcher movements (2 axis). The missile steer towards to the crosshair.
JeffR
Steering Committee
Steering Committee
Posts: 646
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Thu May 26, 2016 6:10 pm
PacoMontanes wrote:
JeffR wrote:What'd be the control/implementation for wire-guided though? That's a bit more broad category, so I'm not sure the exact setup you had in mind. Being able to lock onto a target and have the missile steer towards it?

In fact, camera-guided missile needs a wire too (fiber optics), to transfer control and video image from the camera. An old/common approach solution of wire-guide missile is a control by the launcher movements (2 axis). The missile steer towards to the crosshair.


Right, was mostly trying to think of how it'd work from a control standpoint. A camera guided missle is easy because you'd switch to the camera on the missle and then steer it using, say, the mouse as a normal flying object while you have control.

So what are you thinking for a control scheme on non-camera guide-by-wire? Same sort of thing just without swapping camera? Or just treat it like a lock-on?
PacoMontanes
Posts: 14
Joined: Mon Feb 09, 2015 2:35 pm
by PacoMontanes » Fri May 27, 2016 11:30 am
JeffR wrote:So what are you thinking for a control scheme on non-camera guide-by-wire? Same sort of thing just without swapping camera? Or just treat it like a lock-on?


Not really, there is no lock-on, the missile corrects it's trajectory by following the line defined by the crosshair. The player has to follow the moving target throughout the whole flight.

Instead, the missile with camera control can be used by lock-on.
JeffR
Steering Committee
Steering Committee
Posts: 646
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Jun 01, 2016 9:59 pm
@
User avatar
PacoMontanes


Makes sense.

So, took a bit of time during my lunch break today to start dicking around with a few small bits. Obviously super WIP, but hey whatever!(I figure I'll properly catalog the final results in the OP whenever one is complete, and the rest of this thread can be ideas/WIPs and brainstorming, just so the work being done isn't hard to find in the end. Probably also set up a wiki page for 'em too)

Anywho(Apologies for the editor flubbing, I had resized the window to fit the record space and it made the scene tree/inspector window be out of view, so I had to finnegal with 'em to move them back into the record space without having to redo the recording. In retrospect, redoing the record would have been easier, haha)


I tested hacking together a followPath component and also a turret look-at component.

A few people have expressed difficulty in doing something like a tank recently,with a turret mounted onto a base, which is part of why I took a stab with this.

About half hour to do, could be better, but I had to remember a few functions because I hadn't mussed with 'em in a while. This is purely in script, for what that's worth.

The tank body follows a regular loop path of markers at a(mostly) set rate and orients itself towards the destination node.

The turret rotates on the yaw axis to point to a target object, in this case, me.

Improvements and todo for these:
The follow path is clearly rough, and lurches when it hits a node. This was a super simplistic VectorLerp, and obviously a much better thing to do would be to just copy the destination move code from the aiPlayer instead. So that'll be the main improvement there.

The turret yaw rotation works decently well, but does't have an adjustable speed yet. So that'd be the next thing to do there. Also need to decide how to make the barrel pitch up and down. There's two ways to do that. One is to use an animation like the player's look, the other is to rotate the node the barrel is a child of. The animation approach would be a bit easier to get agreeable from a networking standpoint, so I'll likely go with that for now.

The other main thing is this clued me into some poor behavior with mounting entities. Just mounting them works well enough, but when you try and start having them have their own progressively updating offsets(the turret trying to rotate to look at me, the tank trying to point at the next path node) it causes some issues with the offsets.

So I need to look into that and get that corrected, but hey, that's part of what this whole thing is for!

The end goal on this little drabble would be a tank that drives along a path, and having it aim at makers that pop up randomly. When the turret finally is aimed at the marker it is "destroyed"(hidden) and a new one appears. Should make for a nice, self-contained demonstration of the components + mounting behavior.
Johxz
Posts: 391
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Jun 12, 2016 8:12 am
well hmmmm :roll: :roll: just a few thing a saw in the old forum flashlight, nightvision gogles, binocular, radar, knife (melee attack) I can not think of anything more, if a remember or see something in the old forum throw it over here...but you're covering all already
Johxz
Posts: 391
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Jun 12, 2016 8:21 am
oh! how about adjust the camera and control for a 2D platform... I saw a resource a few moths back, this still apply for what you looking for?
JeffR
Steering Committee
Steering Committee
Posts: 646
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Sun Jun 12, 2016 6:34 pm
Yeah, an example of doing that would be pretty easy. It'd be more about the controls than the camera, persay, but it'd make for a good, simple example :)
Johxz
Posts: 391
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Mon Jun 13, 2016 12:12 am
yeah the controls haha I remember ;) hey I used this, I'll leave it here just in case you need the references.

  • 1
  • 2
18 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 1 guest