#Pov: Control tank's turret and planes just with your mouse

1 messages · Page 1 of 1 (latest)

jovial flame
topaz dock
jovial flame
limpid pewter
#

and you still have shift free

#

gj

summer tulip
#

wait player detectors work on ships?

jovial flame
#

shift + space is for reloading

jovial flame
jovial flame
#

because it return the yaw and pitch relatively to the ship instead of the overworld

#

But you can use reader.getRotation

#

and somehow figure out the real player's facing direction

jovial flame
jovial flame
atomic gyro
#

schematic please

wintry compass
#

wtf

#

how...

jovial flame
jovial flame
pliant tapir
#

Schematic?

jovial flame
topaz dock
jovial flame
topaz dock
#

how tf did the picture duplicate

jovial flame
hot dagger
#

@jovial flame idk if u know but cbc is adding its own optical control thing so itll be even easier than this later on

jovial flame
violet nest
#

Very nicely done! Long wanted to do something like this

#

BTW @jovial flame you can read turret pitch and yaw directly from it with a Block Reader from Advanced Peripherals

#

You don't really need the external block as an angle sensor.

jovial flame
violet nest
#

Yes, I see you're doing that

jovial flame
#

But as far as I know there is not a block reader that can read bearing's pitch and yaw in Advanced Peripherals

#

But there is a digital adapter in Create Craft & Addition mod that can read bearing's angle

violet nest
#

Is this not an item in your game?

jovial flame
#

It can not read the bearing's angle or the auto cannon's angle

violet nest
#

That is the one.

violet nest
#

I should have some code that does that, give me a minute to find it

jovial flame
#

Oh I haven't tried that

violet nest
#
local reader = peripheral.find("blockReader")

os.startTimer(0.05)
while true do
  local event = os.pullEvent()
  if event == "timer" then
    os.startTimer(0.1)
    local NBT = reader.getBlockData()
    --print("Looking at "..NBT)
    print("Start")
    print("Pitch = "..NBT.CannonPitch..", Yaw = "..NBT.CannonYaw)
  elseif event == "key" then
    print("exiting")
    break
  end
end
jovial flame
#

Thanks. I might tried use block reader tomorrow after work or this weekend

violet nest
#

I will make sure to follow your progress.

jovial flame
#

BTW using another bearing as an angle sensor is not that bad imo

#

Like I can fake it as a gun shield if I'm building a tank

#

and I can fake it as a fire control radar if I'm building an anti aircraft vehicle

violet nest
#

Rather than create a second redstone based drive

#

That might create imprecision

jovial flame
#

I will make them has the same kinetic input

#

But different rpm

violet nest
#

The gun has inherent 1:8 gearshift inside

jovial flame
#

Those videos above are just for proving this mechanism

jovial flame
violet nest
#

And doing a great job regardless

#

I just thought it might be good to know the options

#

Are you using a PID for the platform rotation btw?

jovial flame
#

sry I don't know what is the PID

#

I'm not a native english speaker

violet nest
#

Proportional - Integral - Differential controller

#

The platform stops very smoothly at the appropriate angle, so I thought you might have one

jovial flame
#

no I'm not that good enough to do that lol

violet nest
#

Don't worry, you're well ahead many VS builders either way. You'll get there :)

jovial flame
#

It is just different redstone outputs under different conditions