| 05-29-2004, 11:18 PM | #1 |
I am using a model that is unselectable in-game. You can loop-select the unit that uses the model, and the enemy can attack that unit, but clicking on the model does not select it. Does anyone know precisely what property of a model makes it "clickable"? |
| 05-30-2004, 03:45 AM | #2 |
It sounds like you're looking for collision shapes. If you're using 3ds max, then create a sphere or box, go to the user property editor, and check the "Collision shape" box. If you're editing an MDL, use something like the following: Code:
CollisionShape "Collision Sphere01" {
ObjectId 64,
Sphere,
Vertices 1 {
{ -21.2438, 0, 89.3649 },
}
BoundsRadius 47.1113,
} |
| 05-30-2004, 09:03 AM | #3 | |
Quote:
I'm feeling pretty stupid here, but I can't get this to work. Perhaps I'm misunderstanding what's going on. Although this model is poorly centered for some reason, I figured I could increase the bound radius to some generous value to make sure that I encompassed the geosets. This seems to have had no effect. Am I doing this wrong? On a possibly related note, is this similar/different from the MinimumExtent, MaximumExtent, and BoundsRadius parameters that are in each geoset? |
| 05-30-2004, 01:27 PM | #4 |
I don't know what sort of effect the geoset Minimum/MaximumExtents and BoundRadii do, but I've never messed with them and always been fine. You say that you increased the BoundsRadius... Do you mean that there was already a collision shape there? If there was, then I don't know what's wrong. Otherwise, be sure that you added your PivotPoint and set the ObjectId correctly. If you did both of those, then I'm don't know what's wrong. If you post your MDL, I might be able to figure it out. You can use this program to center the model: http://www.geocities.com/oinkerwinkle/GeosetTranslation.zip |
| 05-31-2004, 12:07 AM | #5 |
The model I'm working with is based on the "ruins - bloody altar" doodad. I noticed that that model (as well as mine) are both "clickable" when used as doodads, but that neither is when used as a unit. Unsurprisingly, that model doesn't have a collisionshape in its mdl. I went to the farm model, and added the collisionshape and the paramters like these in the farm geosets: Anim { MinimumExtent { 3.40282e+038, 3.40282e+038, 3.40282e+038 }, as well as using the farm's extent and bounds parameters used in its animations. Although I never tried the collisionshape by itself, judging from failures before, I'm guessing that all 3 of those things might be essencial. Now, the model is perfectly selectable (thank god) ps - Oinkerwinkle, your program made it VERY easy to recenter the model properly. Thanks a million! I did notice that it seems to have the x, y, and z axis mislabeled (I know the x and y are pretty ambiguous in wc3 given the default 270 degree rotation, but I think it was also switching z with x or y) |
