Hey everyone!

I have been working on some c++ code which point tracks a user and extrapolates their co-ordinates within 3D space. i have the co-ordinates in c++ stored as variables and would like to use these variables within the Blender game engine to position an object within the scene.

I have had a play with the logic nodes system in blender 2.55 and am quite impressed at how easy it is to control objects within a scene using the nodes. i would like to know if it is possible to somehow get my variables from my c++ code into the game engine?

I have loaned some books on python but as a newb i dont really know where in blender to begin. I think i need to run the API in order to write a script or something but have no idea where to start.

does anyone know how best to approach this?? once i get the general idea i think i will be able to get started but i am having trouble finding the first steps.


Recommended Answers

All 2 Replies

I'll start by saying I've used blender but I've never used the Game Engine.

Are you trying to export information from a c++ application to be able to read it later from the Blender Game Engine or you're talking about using c++ to manage the it?

If it's the latter, you probably don't have much of a choice but to learn python. Approach it slowly, and you'll probably have no troubles with it. You might even be able to throw some c++ if you need:

If it's the former... You can save to any file format of your choosing and loaded with a specific blender importer (or even one of your own making with python)

Hi Isaac!

Thanks for your post, that clears up some of my question, but im a bit stuck as to where i should for python within the game engine. There is apparently an API however I cant seem to find it.

So other than learning Python, my question really is how would I begin to code for the Game engine instead of using the logic Editor.

EDIT: and yes i would like for both to be running in near realtime. so no pre-existing scripts etc.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.