#Pov: Control tank's turret and planes just with your mouse
1 messages · Page 1 of 1 (latest)
bro bout to make minethunder
ye you will be able to use wasd to control tank's movement, while using your mouse to aim and using space to fire
shift + space is for reloading
It doesn't work correctly on ships
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
and shift itself is for disabling mouse-control when pressed
no more thruster
schematic please
There will be when I finish building sth with this
VS computer + Player detector from Advanced peripheral mod
oh okay
nice
Schematic?
mouse control pitching √
how tf did the picture duplicate
no idea. it didn't duplicate from my view
@jovial flame idk if u know but cbc is adding its own optical control thing so itll be even easier than this later on
yes I do know that. But guess that will be in long future update
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.
I do know Advanced Peripherals, and I use the player detector in it to get the player's yaw and pitch
Yes, I see you're doing that
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
Is this not an item in your game?
That is the one.
It can. It can read a tile entity's NBT
I should have some code that does that, give me a minute to find it
Oh I haven't tried that
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
Thanks. I might tried use block reader tomorrow after work or this weekend
I will make sure to follow your progress.
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
If I were to do it, I would at least attach it directly to the gun's rotational input
Rather than create a second redstone based drive
That might create imprecision
The gun has inherent 1:8 gearshift inside
Those videos above are just for proving this mechanism
ye
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?
Proportional - Integral - Differential controller
The platform stops very smoothly at the appropriate angle, so I thought you might have one
no I'm not that good enough to do that lol
Don't worry, you're well ahead many VS builders either way. You'll get there :)
It is just different redstone outputs under different conditions
