First of all I am a BIG noob at blender but not at python. I want to maker some python games so I thought that blender would be great for this.
I am half way through making my simple game where you move a block around and now I want to make it so when you press the E key, a block appears in front of the cube.
Here is my code so far which I found on-line:
import bpy
bpy.ops.object.add(type='MESH')
ob = bpy.context.object
me = ob.data
me.from_pydata(verts, [], faces)
me.update()
It inserts a mesh at some random coordinates. Does anyonee know how to make it insert a cube at some set coordinates or just simplify my code?
I apologise if my terminology isn't correct but I am new to all of this.
bpy.ops.object.add(type='MESH') ob = bpy.context.object me = ob.data
me.from_pydata(verts, [], faces) me.update()
– Andrew May 23 '15 at 13:18bpyis used in blender but not in the game engine which has kind of separate API which usesbge– Chebhou May 23 '15 at 13:28