Search found 37 matches

by mb
Sat Jun 02, 2012 7:24 pm
Forum: Python
Topic: Camera Setup
Replies: 2
Views: 2289

by mb
Mon May 21, 2012 9:14 pm
Forum: Interactive 3d
Topic: ocean simulator in game engine
Replies: 4
Views: 5576

This file simulates "mathematically" the effects of waves on a boat: http://www.4shared.com/file/NWs2RIAv/waves.html I don't know whether this is what you're searching for: actually waves are invisible, but the boat oscillates very realistically. Wave length, direction, amplitude, and period can be ...
by mb
Sat Apr 07, 2012 1:42 pm
Forum: Python
Topic: world/local Position for 2 objects having same parent
Replies: 1
Views: 1254

Re: world/local Position for 2 objects having same parent

Hi, As I understand, the worldPosition of an object is the combination of the localPosition of the object and the worldPosition of its parent. Right ? I'm assuming that its worldOrientation and its localOrientation is set to identity (ie : no rotation). Moreover, there is no other intermediate obje...
by mb
Sun Mar 25, 2012 11:12 am
Forum: Interactive 3d
Topic: First Project - Interactive Solar System
Replies: 13
Views: 10710

...I made a fast demo based on the above concepts with three planets, one satellite and one sun. You can download it from here: http://www.4shared.com/file/jfSIWwYy/file.html Note that scales and revolution speeds are completely arbitrary. In addition, rotations around local polar axis are missing.
by mb
Sun Mar 25, 2012 10:26 am
Forum: Interactive 3d
Topic: First Project - Interactive Solar System
Replies: 13
Views: 10710

Re: First Project - Interactive Solar System

I think first I'll have to set the rotation times and speeds but I still don't understand how to code it. If you are happy with circular orbits, you could use an empty object for each planet. Put all these empties on the sun object. Then parent each planet to its empty (e.g. make JupiterEmpty objec...
by mb
Tue Mar 20, 2012 8:14 pm
Forum: Interactive 3d
Topic: Game property:timer question.
Replies: 3
Views: 3482

Not to sound rude, I was thinking of that but I want it in milliseconds and doing like that wont let me get the accurate time like the timer property will let me. I just don’t know how to get it to start and stop. Sorry I’m trying to make a reflex game to increase eye to hand reaction time but I ne...
by mb
Tue Mar 20, 2012 6:57 pm
Forum: Interactive 3d
Topic: Game property:timer question.
Replies: 3
Views: 3482

Re: Game property:timer question.

How can you get the timer to stop and start? Like I don’t want it to run until I cross the start line then stop after I cross the finish line. Rather than using a timer property, I would suggest to create your own custom controlled timer variable: - create a float variable called 'myTimer', initial...
by mb
Fri Mar 09, 2012 12:12 pm
Forum: Python
Topic: Calculating object's location and rotating along a curve
Replies: 4
Views: 2114

Re: Calculating object's location and rotating along a curve

...I have a track block (a mesh) and a curve. How can I calculate block's rotation and positions when moving it along the curve? In blender 2.62 this method worked for me: - in the editor create the animation where your track-block follows the desired trajectory; - in the game engine use an action ...
by mb
Thu Mar 08, 2012 6:16 pm
Forum: Python
Topic: Update object transformation in script
Replies: 3
Views: 5416

Since blender 2.51 the possibility of moving/rotating objects (at reasonable speed) in the editor environment has got lost. I started a thread on the matter: http://www.blender.org/forum/viewtopic.php?t=16847&highlight= However your problem could be easily solved in the game engine environment , wit...
by mb
Wed Feb 22, 2012 11:20 am
Forum: Python
Topic: What is the equivalent of setMatrix in blender 2.62?
Replies: 5
Views: 2320

Re: What is the equivalent of setMatrix in blender 2.62?

...So if there is something that let me set the rotation matrix of an object directly, I would love to know about it. The matrix_world attribute (method?) can be used to assign a 4x4 transform matrix to an object. I did not find any method for direct access to the rotation part of the matrix, so if...
by mb
Mon Feb 20, 2012 5:27 pm
Forum: Python
Topic: How to change text object through python?
Replies: 6
Views: 11660

i want to change the text in the game engine. I tried the code u gave, but it changed the text permanently, but not in the game. I want to change it only during the game. In blender 2.62 a text game property is supported. Add a text object, then in the logic editor select "Add text game property". ...
by mb
Sat Jan 21, 2012 7:37 pm
Forum: Interface & Tools
Topic: Center cursor in 2.61 ?
Replies: 1
Views: 7373

shift-S:
cursor to center
cursor to grid
cursor to active
cursor to selected

shift-ctrl-alt-C:
geometry to origin
origin to 3D cursor
origin to geometry
by mb
Wed Jan 18, 2012 3:37 pm
Forum: Interface & Tools
Topic: problem with library
Replies: 1
Views: 565

You can either 'append' or 'link' your model in the terrain file (or viceversa): just choose either from the file menu, select the file where your model is, then import the items you need (camera, lamp, material, object, etc.).

mb
by mb
Wed Jan 18, 2012 3:20 pm
Forum: Python
Topic: Get Game Property of an Object
Replies: 1
Views: 5430

Try to access the object by its name, rather than as the "owner" of the controller, i.e.:

Code: Select all

obj = bge.logic.getCurrentScene().objects['ObjectA']
obj['property'] = 1
mb
by mb
Mon Jan 16, 2012 10:18 am
Forum: Python
Topic: Blender.Redraw() method no more available in 2.51 API?
Replies: 7
Views: 5140

rylangrayston wrote:Oh and another way to make it go faster...
Thank you for both of your suggestions.
However I have finally abandoned the idea of making animations in the editor environment: I converted my scripts to work in the game engine and now I'm happy with that.

mb