Forum rules - please read before posting.

offset for dragging - questions

edited May 2015 in Technical Q&A
Hi, 
Im trying to use the "draggable" object in a hatch in a prison door.
I have 2 issues here.
First is a conceptual one. The instructions say:

It's advisable to add the required mesh to it as a
child object, because the Draggable's position and rotation is determined by it's Drag
mode - therefore, adding a mesh as a child object allows it's Transform settings to be
set safely.

However, because the draggable in a door, and the door is possible to be opened, it needs to be a child of the door,. NOT the dragable (that places itself into the _Movables folder)

I have clunky way around it, that is to have a copy of the hatch, and have that one visable when the door is open, and when the door is shut, replace it with the draggable one.. somehow.. but I envisage huge issues here...

Second thing is:
Ignoring above, I went ahead and tried to get it to work, and after after adding the hatch mesh to the draggable, on runtime, the hatch jumps a few feet above the door. Again probably an issue with parent chaild stuff.

But then I remember something in the curved track tiutorial, where the door was offset by 90 and you had to make an OFFLINE offset so that on game run it would pop back into place. I tried to do a simerlar thing here (moved the hatch into place during play, copied the transforms, and pasted them into the stopped game, but it didnt work.

image



Mark

(PS: I apologise if I seem to be bombarding you with totally unrelated questions, but Im hopping about in may game at the moment trying out ways that AC can take over from the hand built PlayMaker way I was doing before, its lots of fun, but understandably Im hitting alot of initial ???) 
I hope you realise that this barrage is just the tip of the iceberg, most of my game is not having these troubles.. and is benefiting greatly from Adventure Creator, loving it!


Comments

  • Thanks!  I'm glad to see Draggables getting some use.

    It's probably best to start simple before looking at having Draggables parented to other Draggables.  Have you been through the source of the Physics demo?  The cupboard in that is the same principle as a door, so you can use that as the basis for your own prefab.  Once that's working for you, we can see about adding to it with a latch of some kind.
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.