Question by
NinjaRubberBand · Jan 14, 2017 at 04:06 PM ·
gameobjecttransformaxis
unity detect every time object goes up on y axis
My gameObject moves upwards constantly, and i want to spawn an object from that gameobject everytime it moves 3.0 up on the y axis. How do i do that?
Comment
Answer by QuentinLG · Jan 14, 2017 at 04:27 PM
void Update() { if(transform.position.y % 3 == 0) { spawn object } }
Your answer
Follow this Question
Related Questions
How to Change Position of a GameObject to another GameObject C# 1 Answer
Enemy Attacking Even When Not In Range 2 Answers
How can i assign a GameObject to another but only have some of its components? 1 Answer
Change the size of a GameObject in a certain timespan. 0 Answers
Vector3.MoveTowards moving transform 0 Answers