Game Development Community

Confused about mountpoints

by Justin Tolchin · in Torque Game Engine · 05/26/2005 (6:35 pm) · 1 replies

Hi all,

Nice basic question here, I hope. :-) I have an object with several mount points on it (mount0-mount5) and I want to mount different objects in the different positions. I assumed I could do this by calling:

%obj.mountImage(, );

where slot# would be 0-5. But what I discovered is that everything still attaches to mount0 on the object. After a lot of debugging I discovered that when the render transform for each mounted image is retrieved, it uses the "ShapeBaseImageData.mountpoint" field to determine the offset, and since I never set that field it defaults to 0. So by adding a "mountpoint = 1" or "mountpoint = 2" field to my datablocks I can control which mount point they go to. This seems really screwy to me but it worked. But if that's the case:

a) what's the purpose of the second parameter to mountImage()???

b) how can I get an image to be mounted in more than one spot?

Thanks!