Position to local position of child

Hi!
Sounds very easy, but i can’t understand how to calculate.
I want add entity to another as a child on collisionstart event
How calculate local position for this child to looking as position at collisionstart moment?

I don’t quite understand the question. Moving an Entity to a position is separate to looking in a direction. What are you trying to do?

i try realize stucking arrow in dynamic entity

@seryngya Can you better define what issues you are seeing or share your project with the forum so we can have a look? The item that you are shooting the arrow into… Is it a dynamic rigid body or Kinematic? Here is a collect of forum posts that may be helpful. Just wondering if maybe there is something close to what you are looking for and could modify.

https://forum.playcanvas.com/search?q=arrow%20shooting

So you want to add a child entity and have it look in the direction of normal?

The way I’ve done this before is:

Make the arrow entity a child of the entity that is hit
Set the world position of the arrow to the contact intersection point
Get the normal of the intersection point
Create a position vec3 that is along the normal
Have the arrow entity look at that position

Give that a go and if you are still having issues, post an example project that the community can help you on.