- Home /
Question by
Wikened · Jan 06, 2012 at 05:03 PM ·
gameobjectarraycubedetection
Detection if a GameObject is below you or next to you?
Hi, I am wondering how you could check if a Cube was under you and if there was, do nothing, but if there wasn't create a new cube under it until there like 50 cubes then stop?
Yes, this is very similar to MineCraft... I'm trying to understand how this is done...?
Please help!
Comment
If you are talking about a specific cube under you, just compare positions. However if you are talking about any cube, then you just use raycasting pointing from your object downwards.
Answer by DamonD. · Jan 10, 2012 at 03:53 AM
try this
if(Vector3.Distance(OBJECTpositionOne, OBJECTpositionTwo) > Distance){
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Sphere detection system 2 Answers
Collision with specific object... 2 Answers
Array problem? help please! 1 Answer
Array weapons Wheel scroll switch 1 Answer