How do I make an automated gun turret do a search of it's range of motion (with logic, not animation)?
I have a turret (with a laser scope for hit detection) on a moving vehicle. Turret has a gimbal (ball joint) with 60 degrees of motion.
I want the gun to start searching for targets on it's own, scanning left and right and up and down. The ball joint tells me when it's hit a limit but I can't work out how to calculate WHICH limit, i.e top, bottom, left or right.
Been playing with angle sensors thinking I could use the orientation outputs but doesn't seem to make any sense and I can't make head or tail of it. The orientation doesn't seem to be measured in degrees and although you can tell the angle sensor to be 'relative' to another object, that has no effect on the values being output. Doesn't make the orientation figures relative to the thing you've selected. So I'm not even sure what the point of that function is, it doesn't do anything.
Anyway, just hoping someone might be able to point me in the right direction with this as I'm running out of ideas.
-
I think, but don't hold me to this, what you need is a separate tag area.
Have the turret turn back and forth to simulate searching. But have a separate area sensor that is looking for tags. When a tag enters the area, it turns on whatever "look at" follow logic you have on the turret and the turret turns to look at it. So it's actual the tag sensor range that is initially seeing the tag, not the turret.
I'm sure I'm missing steps in there. -
Ah thanks, I think I understand what you're getting at. What would you use as "area sensor" though? Do you mean like a Trigger Zone?
-
Yeah, a trigger zone. I'm still stuck in LBP terminology.
الرجاء تسجيل الدخول لترك تعليق.