Forum rules - please read before posting.

[SOLVED] Object:Transform --> how does it actually work?

edited April 2014 in Technical Q&A
To test throwing an object I took a capsule as item for simplicity. I pick up the capsule, choose it from inventory and click with it on a game object that activates an Inventory Interaction.

Here is what I do on Inventory Interaction:
- Character:Hold Object
- Object:Visibility (->Visible)
- Object:Set parent (-> None)
- Object:Transform

After spending hours trying to figure out how to throw an object to another object, I have to admit I need help again.

Lets say the character is at (X=-6.8, Y=0.03, Z=4.9) and I would like to throw the object from his hand to position (X=-4, Y=0.3, Z=1.2). How do I do that?

What is that "Vector" parameter in Object:Transform anyway? I can't figure it out myself and there is no description of it in the manual, either.

I looked at the Movable script, too, but couldn't grasp from it how to achieve what I want.

The character throws the capsuel, so it can't be all wrong what I did, but he throws it in directions and in a way that I fail to understand.

@Chris: please elaborate on this Action in the manual or make an example in your written tutorials.



  • It looks to me like it should be working for you... the way I've done this is by setting up a similar actionlist: instead of object:set parent (none), I would instead use the clear parent method- this could be the problem, because if the capsule is still parented to the player then it has coordinates based on the player coordinates, not the global coordinates.

    If that's not the problem, it might be in the object: transform action. You can have it translate either TO or BY a certain amount. In your case you should be setting it to translate TO: X = -4, Y=0.3, Z=1.2. Maybe you have it set to transfer by that amount, instead of to that position?
  • Thank you so much, skitt2501!

    Using clear parent did the trick. Hadn't found that option while trying to figure it out.

    Local coordinates instead of global ones, that was what resulted in such confusing behaviour.

    So, now I have only 999 challenges left to solve instead of 1000. :-)
    When I don't get stuck like here, thanks to AC it is a lot of fun tackling all the obstacles.

    Thanks again for pointing out "clear parent" to me, you made my day, skitt!  :-)

  • Glad to help! I also keep finding new ways in AC to solve problems I've caused for myself!
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.