Announcement

Collapse
No announcement yet.

Fixing Pivots to movable mesh in the Product Viewer

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Fixing Pivots to movable mesh in the Product Viewer

    Hi All,

    I'm currently working on a project using the Unreal Studio Product Viewer template and I'm having some queries on making freely moving mesh move on one axis. For instance, I've got several hinged elements and though the way the product viewer moves them default works, the client wants these to be as they are in real-life where they are hinged. I've never worked with moveable mesh as I come from an Archviz Static based background but this is a KEY element to this project. Any clue or ways of doing this?

    *NOTE: After looking around, the thing I'm looking for is essentially a constraint on moving the object(s) on the X, Y and Z axis and rotating on the X and Y and only being able to move it on the Z with no animation just a freely drag up and let go and it'll sit where you left it. I realise this might sound strange and be hard to understand so any information/examples can be provided.

    If this wasn't clear or you need any more information for a solution, please just ask.

    Thanks in advance.
    Last edited by GSS_JXB; 10-08-2018, 07:50 AM.

    #2
    Hello,

    You ll have to do a few things:
    1) enable physic on the actors you want to move and probably disable gravity
    2) add a physic constraint object between the objects you want to control and set it so only one degree of freedom is enabled
    3) You ll have to modify the picking and translation functions in the blueprints of the product viewer template:
    3a) by default and for good reason, you cannot pick physic bodies
    3b) you should not use set actor location on physic body, you should add forces/impulses on the static mesh component instead
    3c) => create a specific case to pick physic bodies, when moving mouse compute a force base on mouse displacement, cap the force and do a add force on your actor
    4) The root actor of your physic chain should probably not simulate physic so it does not move has you drag elements down the chain.

    https://docs.unrealengine.com/en-US/...aintsUserGuide

    Comment


      #3
      Hi UE_FlavienP,

      Thanks for the reply! I'll give this a shot and see how I go! Thank you!

      Comment


        #4
        Originally posted by UE_FlavienP View Post
        Hello,

        You ll have to do a few things:
        1) enable physic on the actors you want to move and probably disable gravity
        2) add a physic constraint object between the objects you want to control and set it so only one degree of freedom is enabled
        3) You ll have to modify the picking and translation functions in the blueprints of the product viewer template:
        3a) by default and for good reason, you cannot pick physic bodies
        3b) you should not use set actor location on physic body, you should add forces/impulses on the static mesh component instead
        3c) => create a specific case to pick physic bodies, when moving mouse compute a force base on mouse displacement, cap the force and do a add force on your actor
        4) The root actor of your physic chain should probably not simulate physic so it does not move has you drag elements down the chain.

        https://docs.unrealengine.com/en-US/...aintsUserGuide
        I've been reading through this and been trying to work it out and I'm still totally lost. I've never used Physics before and it sounds pretty technical. I've been able to: enable the physics on the actor(s) I want to move and disabled gravity and add the phyiscs constraint and allowed a rotation on the axis (I think). I'm still unsure if this is done correctly and the viewer now won't pick up the component I want to move; It acts almost as a static mesh rather than moveable.

        Is there any chance you could provide a more detailed procedure/screenshots of what to do?

        *UPDATE: I've manged to get a physics point and get it fixed to move. My issue now is I cannot select the mesh to move it with the mouse.


        Cheers!
        Last edited by GSS_JXB; 10-12-2018, 05:08 AM.

        Comment

        Working...
        X