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 Dede24 · Sep 19, 2012 at 07:58 PM · inertiahoming

2D Homing Missile with inertia

hey guys,

I would like to make a homing missile which works in a 2D game, meaning that all the rotation happens only on the z axis.

Sadly functions like LookAt only work in a 3D environment, since they utilize all 3 axis to direct the object.

I also would like the missile to have inertia, meaning, that if the targeted object moves, the missile doesnt make sharp corners but transitions naturaly.

I would be really thankful if you could help me out here.

Thanks guys.

Comment
Add comment · Show 1
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 Fattie · Sep 20, 2012 at 08:42 AM 0
Share

you do 2D games exactly like 3D games and you can use all the same physics and maths. the only difference is, set the camera to Orthographic.

in your case things like gravity, AddForce constantForce and so on will help you - exactly like in a 3D game. no difference

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by OtreX · Apr 22, 2016 at 05:09 AM

I'm facing the same problem. I got it fixed-ish by creating an empty gameObject and attaching my 3d missile script, then assigning the X and the Y value of the sprite to be the same of that empty gameObject. It's not an elegant solution and it might be too much to handle for a mobile devices game and that is exactly my case. Also, every now and then, the empty gameObject will begin to travel on the Z axis and even when the sprite's tranform.position.z is locked, it looks weird and breaks the game.

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

12 People are following this question.

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

Related Questions

What does the "compute mesh inertia tensor failed" error mean? 6 Answers

Why am I being asked to change the mesh geometry or supply a tensor manually? 1 Answer

How to create homing missile that follows path using Unity and iTween 1 Answer

Homing projectile 0 Answers

Spinning an object using touch input 7 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