Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Having a OnTriggerEnter make another gameobject Add Force in UnityScript.

$
0
0
Using javascript, I was experimenting with OnTrigger functions with a trigger game object, I thought about triggering another gameobject to add force. Problem is, I don't understand how it would work with a OnTriggerEnter function after adding a "if" statement for identifying a tag or gameobject to detect. How does one achieve this when using two separate OnTriggers like Enter and Exit. Does that mean I have to use a `function update` if I don't create another separate script for the game object that has add force? Thanks.

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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