SOF2Fragger Posted July 1, 2022 I have a model (obj) that's a ceiling fan. I want it to rotate, so I added +ROTATE to the zscript file, but instead, it flips like a pancake. What did I do wrong? 0 Share this post Link to post
0 Moebius Posted July 1, 2022 Too much yeast in your batter! Depends on the orientation of your model and what axis you want it to rotate on. Model fan { Path "Models" Model 0 "fan.obj" SurfaceSkin 0 0 "fan.png" Scale 1.0 1.0 1.2 ROTATING Rotation-Center 0 0 0 Rotation-Vector 0 0 1 Rotation-Speed 8 FrameIndex MDCA A 0 0 } Rotation-Center is relative to your model insertion box. Rotation-Vector is axis and direction. Try different combinations (1 0 0), (0 1 0), (0 0 1) If it's turning in the wrong direction, change vector to -1 0 Share this post Link to post
0 SOF2Fragger Posted July 1, 2022 That's exactly what I have, and it's still flipping Tried 1 0 0, 0 0 1 and 0 1 0. Flipping 0 Share this post Link to post
0 SOF2Fragger Posted July 1, 2022 I scrapped the model, created a new one, and that one works . Thanks 0 Share this post Link to post
0 Moebius Posted July 1, 2022 (edited) Out of curiosity, did you reload all your resources every time you changed MODELDEF? I only ask because I've worked on a problem for hours and think I've finally come up with the fix and it didn't change. Then I remembered I didn't reloaded the change. The brain gets tired after processing the same thing over and over again. I've also found that you have to consider where the right 0, 0, 0 of your model needs to be as it relates to its use. If it's going to rotate, the model 0, 0, 0 must be on the rotation axis. And with large models, if there is a 3D sector that intersects with your model bounding box, it can push it up or down in game. And don't make the bounding box too big. Use RenderRadius to capture the extent of your model vice making the Radius big. I rarely make mine bigger than a 32 unit cube. Just some lessons learned. Have you done any MD3 animated models? Or Switching/Switchable Decorations using 3D models? There's a whole new set of problems. 0 Share this post Link to post
0 SOF2Fragger Posted July 2, 2022 I reloaded each time, and it kept flipping. And no. I've never worked with md3. The models I use, I create using sectors and importing to obj. 0 Share this post Link to post
I have a model (obj) that's a ceiling fan. I want it to rotate, so I added +ROTATE to the zscript file, but instead, it flips like a pancake. What did I do wrong?
Share this post
Link to post