Hello,
i have a littel Problem i have create a basic Bow System, with left mouse key the arrow will fly from spawnpoint and catch a rabbit and the rabbit is dead, that works fine for me but my problem is the arrow , that will not stuck in the body of the rabbit.
What have i do :On The Arrow a fsm :
State 1 :Raycast 2 Ignore Triggers : That function have Hit Event , Hit object and Hit Point,the Distance is on 0.25 from the raycast.
Ok the arrow fly to the rabbit (that have a Box Collider on the Spine2 bone with a FSM) the raycast see the box collider and send the event to state 2
On State 2 :Get Tag : here i take the take from the hit object variabel (that is our rabbit) and via string compare i will see have the hit object the tag animal or not,when it is a animal we go to state 3 :
State 3 :Send Event by Name : that send the a Event to the fsm on the rabbit (Spine bone 2) and set the kinematic to true from the arrow.Next is set Parent (here i use the hit object and use owner).
Problem : my arrow will not in the body from the rabbit the arrow is on the point from collider.
What have i make it :
i have test it out with get position from the arrow , Vector 3 add yxz with z = 0.25, set position with the Vector 3 add.that works only when i shoot the rabbit from the right site (the arrow is in the body , jippi) but from the left site the arrow is in the air.
other test with transform direction : the arrow is in the air for the rabbit.
Hope somebody have a idea at time i go crazy....