Forum rules - please read before posting.

Draggable Objects only work at certain camera angles

Hello Chris,

I am trying to figure out an issue with draggables that refuse to work under certain conditions (see the video for illustration, please).

In brief: 
  • in a first person perspective, when the camera has an exact value of 90° towards the draggable object (topdown), dragging won't work.
  • the more I move away from a 90° value, the better the dragging works; this means it works badly at 89°, slightly better at 85° and close to perfect at 70° and less.
Any ideas what could be causing this?

https://youtu.be/lLvpJilRXhY

Best, Jensen

Comments

  • edited December 2016
    The "Rotate" method of the Draggable system is intended for unconstrained rotation, such as turning an object around all 3 axes.  The issue is that you're locking the Rigidbody around X and Z, which is locking it in ways it's unintended for.

    The Hinge Track was created to get around this limitation - though you mention having trouble getting it to work in the video, that's really the way around this, I believe.  Hinge Tracks were recently covered in the first person tutorial: you can see the steps in creating a door on a hinge here.
  • I actually got the hinge track variation working, too – it's just awkward to have the meshes in a completely wrong orientation in the editor.

    The door will appear wrong again, but when we play the scene, it will be correct.

    It makes scene creation so much more difficult with complex draggables.

    ---

    The "Rotate" method of the Draggable system is intended for unconstrained rotation, such as turning an object around all 3 axes.  The issue is that you're locking the Rigidbody around X and Z, which is locking it in ways it's unintended for.

    Oh well, that is tough to figure out for the user, don't you think, Chris? 
    If I read "Rotate" in a dropdown menu, I would never suspect that there are unintended use scenarios, especially not for simple one-axis-only-rotations.

    After all, when it comes to draggable rotatable objects in adventure games, we always needs knobs, wheels, cogs and stuff like that – objects that have only one rotation axis in general.

    It's already hard to think of an object that has two rotation axes, but I could not come up with one single object of the real world that has unconstrained rotation, but fully constrained location. What kind of objects is this setting intended for then?

    It would be really great to have a very (!) simple way of making these things.

    ---

    Anyway, this is working now!

    Best, Jensen! And happy new year, too! :-)




  • It would be useful if you were wanting to make an interactive 3D inventory.  It would take a bit of coding in e.g. a custom Action, but you could feasibly spawn rotate-able inventory items in front of the camera for the player to examine more closely.

    I agree that the unconstrained necessity of it is not intuitive, so I'll add a note or warning about that in a future update.  I also empathise that the rotation-correction needed is not intuitive, however a way to counter this automatically without causing breakages is currently not clear to me.  I shall at least think on it, however.
  • After some code-wrangling, I think I've managed to sort out the rotation-correction issue.  It'll be optional, as it would require a change to existing draggables were it enabled by default, but expect a checkbox to have children retain their transforms when locking to a track in v1.55c.
  • Oh, that's great - thanks, Chris!
Sign In or Register to comment.

Howdy, Stranger!

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

Welcome to the official forum for Adventure Creator.