Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

Get arrows to stick into things that move.

$
0
0
I have a nice little bow and arrow system that sticks into things. But when i shoot an object that moves the arrow stays put, but the movable object moves, leaving the arrow behind. I would like to make the arrow a child of the object it hits, but i suspect there will be a scaling issue. So problem 1: Get arrow to stick into something and move with it. and problem 2: Get it to keep its own scale. I have done a tutorial on YT but it was 6 years old and doesn't seem to work. Any Ideas? Oh and this is code so far: public Rigidbody rb; void Start() { rb = GetComponent (); } void OnCollisionEnter() { rb.velocity = new Vector3(0, 0, 0); //make child of other object Destroy(GetComponent()); } }

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>