Posts

Showing posts from October, 2018

The Aeroplane in Action!

Image
It's been a remarkably productive couple of days!  That's not like me at all! Anyhoo, thanks to the glorious Godot Engine , I now have the plane in a scene and a gunsight (made in Inkscape ) moved around by a USB game controller.  Nice! I use the x and y from the controller's analog stick and map that onto viewport space to produce a screen position, using the likes of: cameraNode.get_viewport().get_visible_rect().size.x   Then, I use the camera to project that position into 3D space with var projectVector = cameraNode.project_ray_normal(screenPoint); Finally, I scale that up to the z-distance I want the gunsight at and set that position on the gunsight node!     gunsightNode.translation = projectVector*(100/-projectVector.z); Then, it's just a case of making the plane point at it, and adding a little roll:     playerMeshNode.transform = playerMeshNode.transform.looking_at(        ...

Twin Engine Low Poly Model

Image
This morning I have attempted to model a low-poly WW2-style twin-engine aeroplane.  I wanted it to be somewhere between a DeHavilland Mosquito and a P-38 Lightning.  It turned out more like a mosquito, and there are plenty of tweaks I'd like to do.  However, it is intended for use in an exploration of a 3D flying shooter idea.  Not sure if it'll be bullet-hell or Starwing-esque, but it'll be a thing.  That's the incredibly specific and in-no-way-flawed plan.

Motor Controller from Raspberry Pi

Image
I've finally got off my backside and tested out the N20 motors I ordered what feels like a billion years ago .  Part of the delay was that I lost the original L293D motor controllers I was going to use.  I am just that awesome. It took a little fiddling around, but I got the motor and raspberry pi powered from an ATX PSU and the pi's pins connected via an IDE cable to the L9110S module I got from ebay . Then, I used gpiozero's PWMOutputDevice to create a forward device on one pin and a backward device on the other.  I didn't even have to faff about with the frequencies - just set the value on the object and away it went! So now, my plan is to build the base frame for my CNC router and attach this motor to a threaded rod and rotary encoder.  Fingers crossed that tiny motor has enough torque to move the cutting tray. :S