【问题标题】:MEL nParticles stop rotation after collisionMEL nParticle 碰撞后停止旋转
【发布时间】:2018-06-10 19:38:52
【问题描述】:

我创建了一个简单的nParticles,并带有一些表达式的初始方向和旋转,问题是在与地面碰撞时它们会继续旋转。我在网上遵循了一个教程,但我没有太多的表达经验。我在创作中使用了这些表达式:

nParticleShape1.InitialOrient = <<rand(360),rand(360),rand(360)>> ;
nParticleShape1.RotateFactor = <<rand(10),rand(10),rand(10)>> ; 

在之后的运行时:

nParticleShape1.InitialOrient += nParticleShape1.RotateFactor ;

如何让它们在碰撞后停止旋转?

【问题讨论】:

    标签: maya mel


    【解决方案1】:

    您可以使用简单的if-else 运行时语句来完成:

    if (nParticleShape1.event >= 1) {
        nParticleShape1.rotatePP = <<$x, $y, $z>> ; 
        //rotation at the moment of and after the collision event...
    } else {
        nParticleShape1.initialOrient += nParticleShape1.rotateFactor ; 
    } ;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-18
      相关资源
      最近更新 更多