Hi,
Sorry to be posting so many questions recently, but we're trying to get a lot done quickly and so far you all have been really helpful. Thanks for answering. Our most recent issue is with trying to turn a .ase file into its own TObject, or at least a convenient mesh that we can code into a world. Ideally we could make this a subclass of TFrame that we can manipulate as any other object. In order to get to this step, we first tried to follow the outline of the boat mesh included with Croquet. I added the following three methods to a world: createRabbitMeshGroup | rabbitMeshGroup rabbit | rabbitMeshGroup := TGroup new. rabbit := TLoad3DSMax new initializeWithFileName: (FileDirectory pathFromURI: 'Content/Meshes/rabbit.ASE'). rabbit translationX: 0 y: 0 z: 0. rabbit collapse. rabbit boundsDepth: 2. rabbit objectName: 'Rabbit'. rabbit scale: 0.05. rabbit initBounds. rabbitMeshGroup addChild: rabbit. ^ rabbitMeshGroup createRabbit: space | rabbitMeshGroup vehicle| rabbitMeshGroup := self createRabbitMeshGroup. vehicle := self attachToVehicle: rabbitMeshGroup. vehicle runScript: #signalPopupMenu: when: { vehicle. #blueButtonUp }. ^ vehicle makeRabbit: space | vehicle | vehicle := self createSailboat: space. space addChild: vehicle. I assume there must be some difference in using the .mdl that the boat uses, and the .ase that I'm trying to use, but I'm not sure what it is. Any help with fixing this, or, even better, turning the file into its own object, would be greatly appreciated. Thanks |
> createRabbit: space
> | rabbitMeshGroup vehicle| > > rabbitMeshGroup := self createRabbitMeshGroup. > > vehicle := self attachToVehicle: rabbitMeshGroup. Do you have an attachToVehicle method? > makeRabbit: space > | vehicle | > > vehicle := self createSailboat: space. Shouldn't that be self createRabbit? Scott |
In reply to this post by dlw1
Ignore the vehicle stuff. Try something like this:
makeRabbit: space rabbit := TLoad3DSMax new initializeWithFileName: (FileDirectory pathFromURI: 'Content/Meshes/rabbit.ASE'). space addChild: rabbit. Peter B. Moore Academic Computing - Office of Information Technology University of Minnesota On Jul 31, 2008, at 10:15 AM, <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |