[SOLVED] Object:Transform --> how does it actually work?
Hi!
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.
Thanks,
orrence.
Comments
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?
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! :-)
Cheers,
orrence.