We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

limit PAN ?

Home Forums Puzzles limit PAN ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #86288
    NaxosCG
    Customer

    Hello there !

    Is there an easy way to limit pan, a bit like we can limit orbit putting some min / max angles ?

    "1+1=3... for large values of 1"

    #86294

    Hi,
    Unfortunately this feature is kinda hard to implement considering the camera can be rotated in many directions and panned simultaneously. Need to figure out some method to constraint them both :scratch:

    Soft8Soft Tech Chief
    Want more Verge3D updates? Follow me on X, Facebook, or LinkedIn

    #86296
    NaxosCG
    Customer

    i tried to set it on a path constraint : does not block pan outside the path.
    Also tried float limit on position X and Z (3dsmax) : not better…

    Maybe using puzzles limits ? Not sure how to.

    Please let me know if you can achieve that.
    Regards.

    "1+1=3... for large values of 1"

    #86401

    Hi,
    You might try out the following snippet. It works, but not quite seamless:

    limit camera pan puzzle

    const orbitPos = app.controls.targetObj.position;
    
    orbitPos.x = v3d.MathUtils.clamp(orbitPos.x, -1, 1);
    orbitPos.y = v3d.MathUtils.clamp(orbitPos.y, -1, 1);
    orbitPos.z = v3d.MathUtils.clamp(orbitPos.z, -1, 1);

    Replace -1 and 1 with actual panning limits.

    Soft8Soft Tech Chief
    Want more Verge3D updates? Follow me on X, Facebook, or LinkedIn

    #86405
    NaxosCG
    Customer

    Wonderfull ! it works !
    Just if someone else want to use it from 3dsmax : it is Y-up (the up is Y, not Z)

    "1+1=3... for large values of 1"

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.