- Home /
Make object move over other object in 3D space
Hey y'all, thanks for reading my question. I'm pretty new to Unity.
I'm trying to find a script that will allow an object to move over another one. By that I mean that when this object collides with another one, instead of being pushed forward, it will maintain its X and Y coordinates, but move around the form of the other object on Z.
Thanks again!
Answer by awesomeaustin316 · Jun 06, 2012 at 09:28 PM
you shouldn't ask for scripts. if you're too lazy to write it your self then at least google it first.
I am sure that @xdavidj did use google first... Isn't the point of Unity Answers to get help on stuff that you cant figure out yourself?
And in response to the question, are the objects rigidbodies?
@sketchers1: Well, i'm not sure if he really searched before he posted that question. The main purpose of UA is to provide a knowledge base for Unity. See the FAQs especially "What are the guidelines for writing good questions?"
Generally asking for complete scripts is not the purpose of this site.
Also reporting posts should only be used "as last resort" in rare cases (advertising, spam, ...).
Btw. the question and this post (which should be a comment, not an answer) are two month old.
Answer by Berenger · Jun 06, 2012 at 07:51 PM
If you think about a problem that way : "I'm trying to find a script that will", that's not a good start. You should think of how to do it yourself. Even simple ones, need to learn how to walk before (etc).
In your case, it depends on how you're moving your objects and how you can detect collision. Here are some leads : OnCollisionEnter, isKinematic, Translate or AddForce ?
Your answer
Follow this Question
Related Questions
How to destroy bullet on collision! 2 Answers
How Do I Freeze Position ? 2 Answers
Destroy Projectile on collision 3 Answers
Destroy on collision 3 Answers
Changing Rigidbody Drag on Collision 1 Answer