Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 nafis_shifat · Apr 16, 2017 at 01:29 PM · script.scriptingbasicstransform.forward

What is transform.forward?

I am working with a project getting help from a tutorial where he used transform.forward function.He didn't explain this function.So I need help.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by UnityCoach · Apr 16, 2017 at 07:03 PM

transform.Forward is a Vector3 that tells you where the object is pointing at.

Comment
Add comment · Show 1 · 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
avatar image gtaharaedmonds · Apr 23, 2017 at 08:34 PM 1
Share

You know the blue movement arrow in the scene view? You can think of transform.forward as the direction of that arrow.

avatar image
-1

Answer by Cuttlas-U · Apr 16, 2017 at 07:17 PM

hi; for example when u want to give force to move to an object u have to mention which direction this force should be applied and forward is one of them;

we have these Directions: forward , Right , left , up , down

u can multiply any of these direction like this :

 GetComponent<RigidBody>().AddForce(Vector3.Forward * 10 ) ;
Comment
Add comment · Show 5 · 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
avatar image UnityCoach · Apr 16, 2017 at 07:21 PM 0
Share

I get your point here, though Vector3.Forward isn't the same thing as Transform.Forward, unless the object is facing Z+ direction, off course..

avatar image UnityCoach · Apr 16, 2017 at 07:24 PM 0
Share

Vector3.Forward, Vector3.Right, etc. are simply shorthands for (0, 0, 1), (1, 0, 0), etc.. While Transform.Forward returns the orientation of the Z+ axis as a Vector3.

avatar image nafis_shifat UnityCoach · Apr 23, 2017 at 04:57 PM 0
Share

Then what is the difference between transform.forward and vector3.forward? I am really not being able to understand that.Help me please.It Will be helpful if you give any example.

avatar image tanoshimi nafis_shifat · Apr 23, 2017 at 05:10 PM 0
Share

Vector3.forward is the forward facing direction of the world. It remains constant for every object in the scene, however they are rotated.

transform.forward is the forward facing direction of an individual object.

Show more comments
avatar image
0

Answer by DamonJager · Nov 09, 2017 at 04:46 AM

I think that setting it triggers another function like orthonormalization. But I can be wrong. I'm also interested in this.

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

8 People are following this question.

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

Related Questions

How to reduce my script ? 0 Answers

is it ok to change the source scripts? 0 Answers

Trying to find the highest number than add it to itself. 2 Answers

Can I use transorm.position here? 1 Answer

How would i make it transform player.position =target.position? 2 Answers


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