sketchucation logo sketchucation
    • Login
    1. Home
    2. markorvll
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 1

    markorvll

    @markorvll

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    markorvll Unfollow Follow
    registered-users

    Latest posts made by markorvll

    • MsPhysics Script

      Hello, I was wondering why I always get an error message when using the script for MsPhysics. Here's the script

      Triggered when simulation starts

      onStart {

      Have the desired velocity as 5 m/s

      @des_vel = 5
      }

      Triggered every time the world updates

      onUpdate {

      Compute the force to apply

      timestep = simulation.update_timestep # (in seconds)
      force = this.mass / timestep # (in Newtons)

      Get current velocity

      cur_vel = this.get_velocity

      leftx() returns a value ranging from -1.0 to 1.0, depending on the state

      of A and D keys or the horizontal position of the left joystick.

      fx = (leftx() * @des_vel - cur_vel.x) * force

      lefty() returns a value ranging from -1.0 to 1.0, depending on the state

      of W and S keys or the vertical position of the left joystick.

      fy = (lefty() * @des_vel - cur_vel.y) * force

      Apply force on this body.

      this.add_force(fx, fy, 0)
      }

      Not sure what I'm doing wrong.

      Thanks

      posted in Newbie Forum sketchup
      M
      markorvll