Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

3D Rotation Help

Is there anyway that I can stop a 3D model that is rotating moving from it’s original coordinates??

Thanks in advance :)


  • edited September 12 Posts: 2,364

    @Creator27 - if you are rotating around a fixed point you shouldn’t be seeing the object move - that is unless you are moving the camera or using physics on the object.

    Can you post code so that we can see what you are trying to do.

  • Posts: 104

    @Bri_G, sure. Here’s the code I’m trying to fix:

    In function setup()

    sea = scene:entity()
        sea.model = craft.model(asset.documents.Dropbox.Donut)
        sea.position = vec3(0, -0.093, -0.06)
        sea.eulerAngles = vec3(0, 0, 0)
        sea.scale = vec3(0.045, 0.045, 0.045) / 8
        sea.material = craft.material(asset.builtin.Materials.Standard) = readImage(asset.builtin.Blocks.Lava)
        sea.material.offsetRepeat = vec4(6.0, 6.0, 5.0, 5.0)

    In function setup() as well:

    lavaRot = 0

    In function update():

    lavaRot = lavaRot + 0.04
    sea.rotation = quat.eulerAngles(0, 0, lavaRot)
Sign In or Register to comment.