Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by 3 · Jan 27, 2013 at 02:24 AM · transformterrainobjecttranslatetransform.translate

Move terrain towards object? (illusion of moving forward)

So I did this: targetterrain.transform.Translate(Vector3.back * Time.deltaTime * 40); and it works, but the problem is this obviously only works when your facing directly forward. How would I make it so that the Terrain always moves towards whatever direction you are facing, giving the illusion of the object going forward quickly? I can't have the object move forward on its own because of a bug with the SDK that I'm using this for. Any help would be greatly appricated, thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by 3 · Jan 27, 2013 at 07:02 AM

Never mind, after around 6 hours straight of trying to figure it out, I got it, for anyone who stumbles upon this and needs some help:

  targetterrain.transform.Translate(Vector3.forward * Time.deltaTime * 100, target.transform);

the , target.transform part makes it so that you move relative to the location of the target, which I assigned to be the player.

Problem solved, case closed, problema resuelto, הבעיה נפתרה, 问题解决了, 問題解決, حل المشكلة.


In case you don't speak english, though I doubt you would be here if that was true, here you go:

לא נורא, לאחר סביב 6 שעות רצופות של מנסה להבין את זה, יש לי את זה, לכל מי שכושל על זה וזקוק לקצת עזרה:

      targetterrain.transform.Translate (Vector3.forward Time.deltaTime 100 target.transform);

, target.transform זה חלק עושה את זה כדי שתעבור ביחס למיקומו של היעד, שבו אני מוקצה

気にしないで、まっすぐにそれを把握しようとしているのは約6時間後に、私はこれに遭遇し、いくつかの助けを必要とする人のために、それを得た:

     targetterrain.transform.Translate(Vector3.forward* Time.deltaTime* 100、target.transform);

、 target.transform部分では、そうすることは、私が選手に割り当てられたターゲットの位置に対して相対的に移動することになります。

لا يهم، بعد حوالي 6 ساعات متواصلة من محاولة الرقم بها، حصلت عليه، لمن يتعثر على هذا ويحتاج بعض المساعدة:

没关系,直试图弄明白约6小时后,我得到了它,任何人都绊倒在此需要一些帮助:

     targetterrain.transform.Translate(Vector3.forward* Time.deltaTime* 100,target.transform);

的target.transform*,*部分,使得它让你相对移动的位置,这是我的目标分配给玩家。

No importa, después de alrededor de 6 horas sin parar de tratar de entenderlo, lo tengo, para cualquier persona que se encuentra con esto y necesita un poco de ayuda:

      targetterrain.transform.Translate (Vector3.forward Time.deltaTime 100, target.transform);

la parte , target.transform hace de modo que se mueve con relación a la localización del objetivo, lo que he asignado para ser el jugador.

What? I had some free time... and thanks for the help everyone! A Shining example of how the unity community works together! Just kidding of course, I've mostly had great experiences with everyone here and I'm greatful for previous support.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Shaking GameObject Problem 1 Answer

Moving an object towards a clicked object 1 Answer

Moving an object 1 Answer

transform.Translate not working after exporting to Android 2 Answers

Why do grouped Terrain objects move together but don't rotate as one? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges