Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Adding rotation to Physics.AddForce(); ... Getting weird error?

$
0
0
Ok I'm getting a really weird error. I have 2 codes, 1 is a gun script to shoot and another is a ragdoll script for my zombie that I'm shooting. When I raycast and hit a zombie, I use if (hit.transform.GetComponent()) { hit.transform.GetComponent().raycastDirection = transform.position; } For some reaon, it keeps saying it can't convert Vector3 to Trasform. Obviously it says transform.position above. So why isn't this working? Thanks for anyone who can figure out the problem. All of these variables are transforms, not vector3's.

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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