Blender 3d Game Kit Download
The top bottom constraint is a bit tricky. As camera keeps moving with plane. I used camera as a reference to calcuate the top and bottom screen edge.
Home of the Blender project - Free and Open 3D Creation. Download Blender v. Whether you are an animator, modeler, VFX, game developer, 3D Printing. Find the best free Blender 3D model downloads for Blender internal, cycles and the Blender game engine here. Updated daily from the Blender community.
Get camera position 2. Calculate current top edge Y location 3. Calculate current bottom edge Y location 4. Compare with current plane location, and return signals, -1 as plane too low, 1 as plane too high, 0 for plane inside the screen 5. Feed the signal and mouse movement to function edgeMoveFilter, which only permit plane move toward centre if it is on edge The code is below and red marks are comments. Go to gamekit on google code site to get the source. Copy the svn script and run it in a terminal.
It will download the whole package onto your hard disk. Go to apple developer site register yourself and pay $99 to get the iOS developer licence. So you can test applications on your iOS devices. Go to mac application shop download Xcode. Currently using 4.6 4.
Open xcode and go to preference - download install the command tools. Search cmake and install.
Blender 2.78 Released
Search xquartz and install. Point source to gamekit-read-only you downloaded before.
Blender 3d Game Tutorials
Point target to a folder under it. Normally named build. Click configure once. And wait for the settings to come up. Turn on OGREKITBUILDIPHONE, Turn on OGREKITBUILDGLESRS.
Turn off OGREKITBUILDGLRS 9. Click configure again.
Only one red line. And then click again. There will be no red lines. Click generate. This will generate a xcode project for you named ogrekit.xproject in the build folder.
Link your iPhone, iPad to computer and start Xcode. This will bring you to a button to set your device for development.
Click and finish the process. Copy your own blender file for testing into iphoneDemo folder. Open ogrekit.xproject in xcode and drag the file under iphoneDemo. Open main.mm under iphoneDemo folder.
Edit the name of the blender file to the one you just copied. CGFloat screenScale = 1; 15. Change the target to buildAll-your device name. And Command + B to build.
For the first time it will take a while. But afterwards will be much faster. After succeed the build. Make sure you have your device connected. Change the target to IphoneDemo-your device and click run. Wait for several minutes. The files will be compiled and uploaded on to your device.
The App will start running by itself. For ipad just go to the summary page and change the target device to ipad. Following last tutorial, background moving, as moving direction is wrong, we need to fix it first.
Rotate camera and change motion direction in game logic editor. Adjust plane shape. Cut seam line on the plane model. And generate uv map.
Export uv map as image file. Open uv map in gimp2 to paint the texture. Save image and load into Blender 7. Apply texture to plane. And verify in 3d view. Creat txt file.
Name it OnInit.lua and put some global variables/parameters. So later on if we want to change something globally, we can easily find them.
This script will be called automatically when game starts.