3D Objects & IDs

Started by Tornado7, June 28, 2004, 11:17:50 AM

Previous topic - Next topic

Tornado7

Hi Egon,

I'm here again... I'd ask you in which way, if it's possible, I can express a 3D Object using is ID instead of is name; i.e.:

something like Object3D(ID).animate instead of animateMe.animate

It's possible to force a 3D Object to get a specific id (I've just find out a method to set the id of the next obj)?

Bye and thanks

EgonOlsen

You can use getObject() or getObjectByID() from World. But i don't think that this is a very smart idea in most cases, because it requires some lookups for the object which will cost some time. It's maybe neglectable though.
You can set the name of an object to whatever you want as long as it's unique. You can't really set the ID. The getNextID() and setNextID()-methods are for serialization of Object3Ds only. They are not meant to be used for anything else.

Tornado7