We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Variables from C++ into Blender Game Engine

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.

thanks!

2
Contributors
2
Replies
11 Hours
Discussion Span
2 Years Ago
Last Updated
3
Views
kshaaban
Newbie Poster
10 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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:
http://docs.python.org/extending/extending.html

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)

Isaac Remuant
Newbie Poster
24 posts since Apr 2010
Reputation Points: 50
Solved Threads: 4
Skill Endorsements: 0

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.

thanks

kshaaban
Newbie Poster
10 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.5370 seconds using 2.68MB