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
1
Question by kevdotbadger · Feb 10, 2013 at 09:33 PM · itweenitweenpath

iTween camera path

Hay all. I have a problem.

I'm using iTween and I want to move a camera similar to how Crash Bandicoot's camera move. It seems that CB's camera has a path that it never leaves, however as Crash progresses through the level the camera moves along that path.

I was thinking that I draw the path, then attach a camera to that path, then get my chars position, and pretty much find where the camera should sit on the path based on my position.

Anyone have any idea how I should do this? Is this a sensible way of doing this?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by jasperstocker · Feb 09, 2014 at 03:30 PM

Might I suggest Camera Path? I've included a demo of a Crash Bandicoot style camera here

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
avatar image
0

Answer by robertbu · Feb 11, 2013 at 01:02 AM

This is going to be difficult with iTween's path functionality (at least directly). There are spline packages in the Asset Store which have methods to find the closest point to the path.

You could also implement a path as a series of connected line segments through an array of Vectors. Finding the closest point or the closest line segment would be easy. Then you can find the closest point on the line segment. The Math3D script has ProjectPointOnLine() method if you need it.

Note if you want a smoother path, you can take the rough path and use iTween to generate a smooth path of points and then use the new points. You will also find a smoothing routine in this post:

http://answers.unity3d.com/questions/392606/line-drawing-how-can-i-interpolate-between-points.html

Comment
Add comment · Show 4 · 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 kevdotbadger · Feb 11, 2013 at 12:34 PM 0
Share

Thank you for your answer. Could tell me which spline packages would work?

avatar image robertbu · Feb 11, 2013 at 02:14 PM 0
Share

$$anonymous$$egaShapes has a FindNearestPointWorld() methods. I don't know about any others for sure but would look into SuperSplines.

avatar image kevdotbadger · Feb 11, 2013 at 10:22 PM 0
Share

So i should be making the spline with another 3rd party plugin, then use that to calculate my camera location? Then draw over that spline with an iTween path to position the camera?

avatar image robertbu · Feb 11, 2013 at 10:37 PM 0
Share

The third-party spline will give you the position, so there is no need for iTween.

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

10 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

Related Questions

How to animate a moving platform GameObject? 2 Answers

iTween.PutOnPath similar function for LeanTween or DoTween 1 Answer

iTweenPath Issues in windows? 1 Answer

iTween 2D Path rotation 1 Answer

itweenpath scale and position 0 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