- Home /
Get current position of object in another objects after collision.
Hi, I have two 3d objects both have collider enabled. One is too much big and second one is small, and both are exist independent in world space. When small 3d object move and enter into first one I get know using collider isTrigger function. So I want small objects current position with respect to first one object so that I get to know where it is moving actually in first one box. How can I do this. This will be great for me. Thanks in advance.
var smallObjectPosition:Vector3;
function OnTriggerEnter(object : Collider)
{
smallObjectPosition = object.transform.position;
}
this will give the position in world space, hence you can calculate the relative position, if you have the position of both objects.
Your answer
Follow this Question
Related Questions
How to compare position of two child of different parent's object. 1 Answer
Cloud recognition in Vuforia 0 Answers
App get crash on hiding 3d object. 0 Answers
Movement with playmaker 0 Answers
Slingshot 3d : Add Force to ball with Line infront 0 Answers