0

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.

Chebhou
  • 19,533
  • 51
  • 98
Andrew
  • 101

0 Answers0