Imaginary box in OgreNewt

PSBT

24-11-2008 17:06:23

Hi all!

I'm new around here, and I'm happily using Python-Ogre for a school project :)

The last thing I tried to do, was to add physics using OgreNewt. I've succesfully set everything up, and I've made a little demo to test the physics. I created a couple of Entities, and set then in random positions.

However I noticed that if I place an object past 100 units in any of the 3 axis, the object won't Update.

For example this works perfectly:

for i in range(0, 100):
newBullet = Bullet("bullet" + str(i), "cylinder.mesh",
ogre.Vector3(random.uniform(-100, 100.0),
random.uniform(10, 100.0),
random.uniform(-100, 100.0)))


But when I set the entitie's height to a value bigger than 100, like this:
for i in range(0, 100):
newBullet = Bullet("bullet" + str(i), "cylinder.mesh",
ogre.Vector3(random.uniform(-100, 100.0),
101.0,
random.uniform(-100, 100.0)))


The entity does not update (gets affected by gravity)!!

Am I missing something? Maybe the world has a size, and I have to set it?

Thank you very much,
Pedro

andy

25-11-2008 00:48:34

You can do a world.setWorldSize ( vector3, vector3 )

Regards

Andy

PSBT

25-11-2008 21:57:56

Andy, thanks for the quick answer!

That was kind of obvious. Sorry for the stupid question.

Cheers,
Pedro

andy

25-11-2008 22:54:57

No such thing as a stupid question -- glad I could help...

Andy :)