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 /
  • Help Room /
avatar image
0
Question by zolutr · Oct 11, 2016 at 02:03 AM · unity 5rpgcutscene

make character move and interact by itself final fantasy style

so i want to make lets say "cutscenes" but they are not actually cutscenes, you know in older games when you get to some plot important point sometimes characters will start moving and talking on his own? thats what i want to do but i dont habe any idea where to start. tought of making this by code but it will be lots of code for all the scenes and that does not look like the best option, any advice on how to do it without code or if it is posible?

Comment
Add comment · Show 3
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 zolutr · Oct 11, 2016 at 02:04 AM 0
Share

maeby its usefull to know, im planing on using orkframework and dialog system for unity assets, maeby they include an option for this?

avatar image zolutr · Oct 12, 2016 at 01:16 AM 0
Share

[bump] some has any idea? anything is usefull at this point

avatar image starr_stealer zolutr · Oct 12, 2016 at 01:39 AM 0
Share

@zolutr Unless I miss understood your question my answer below should be a great starting point for what you want to do. Have you had a chance to try it out?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by starr_stealer · Oct 11, 2016 at 07:39 PM

I've seen a lot of users recommend iTween for this, I have not used that tool so I can't speak much about it.

Below is very basic idea of how you could do it, would need tweaks for your task, and handle performance impacts, etc. As well as handling smoothing, (ie the 3rd arg of Lerp)

 void MovePlayerScripted()
 {
     float delayTime = 0.0F;
     StartCoroutine(WaitAndMovePlayer(delayTime));
 }
 
 IEnumerator WaitAndMovePlayer(Vector3 newPosition, float delayTime)
 {
     // this is just to show how you could instruct it to wait before moving
     yield return new WaitForSeconds(delayTime);
 
     float startTime = 0f;
 
     while(true)
     {
         startTime += Time.DeltaTime;
         player.transform.position = Vector3.Lerp(player.transform.position, newPosition, startTime);
 
         // once player is at newPosition, stop the Coroutine
         if (player.transform.position == newPosition)
         {
             yield break;
         }
 
         // else keep Lerping toward newPosition
         yield return null;
     }
 }

Lerp works like this, top level wise. You provide two Vector3's and a Float. The first Vector3 is the current Position, while the second is the Target Position. The final argument Float is a fraction used to determine the returned Vector3, the new Position. If the Float is 0, the first Vector3 is return ie no movement, if the Float is 1, the second Vector3 is return ie movement complete. If the Float is 0 > && > 1, that value is used to select a point between the two Vector3s toward the second one. Smoothing is often needed to get rid of gittering, or quick skips in the movement.

Docs on Lerp: https://docs.unity3d.com/ScriptReference/Vector3.Lerp.html

Wiki that talks above moving objects: http://wiki.unity3d.com/index.php?title=MoveObject

iTween: http://itween.pixelplacement.com/index.php

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

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

Map creator inside my game 0 Answers

rpg enemy target gives null reference 0 Answers

[URGENT!] Unity crashing when I level up my character in game? 1 Answer

How to differ between LoadLevel and starting the scene for the first time 2 Answers

How to get an intro cinematic to play 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