Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
4 captures
13 Jun 22 - 14 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 AgathiK · Feb 17 at 11:22 AM · buttons

Switch scenes problem with the canvas

Hi! Can anyone help me with the problems that I am facing while I am struggling to finish the design of my game please? I will add him/her on my credits! The game is a bowling. 1. How can I add an image "Game Over" in my scene through the code which counts the scores? The game stops when it completes the 10th box. 2. I created a capsule-player and a camera which follows the player. However the rotation doesn't apply to my player.

public class PlayerExploring : MonoBehaviour { public Transform player; public float moveSpeed;

 public Transform camPivot;
 public float turnSpeed;
 //public Vector3 offset;
 

 // Update is called once per frame
 void Update()
 {

     if (Input.GetKey(KeyCode.A))
     {
         player.Translate(Vector3.left *moveSpeed*Time.deltaTime);
     }

     if (Input.GetKey(KeyCode.D))
     {
         player.Translate(Vector3.right * moveSpeed * Time.deltaTime);
     }

     if (Input.GetKey(KeyCode.W))
     {
         player.Translate(Vector3.forward * moveSpeed * Time.deltaTime);
     }

     if (Input.GetKey(KeyCode.S))
     {
         player.Translate(Vector3.back * moveSpeed * Time.deltaTime);
     }

     //cam.LookAt(player);
     //cam.position = player.position + offset;

     
         camPivot.position = Vector3.MoveTowards(camPivot.position, player.position, moveSpeed * Time.deltaTime);
         camPivot.rotation = Quaternion.RotateTowards(camPivot.rotation, player.rotation, turnSpeed * Time.deltaTime);

         player.Rotate(Input.GetAxis("MouseX") * Vector3.up * turnSpeed);
     
 }

}

  1. In scene 1, I have the start button. By clicking that, the game begins-moves to scene 2. The score board appears in white and the exit button doesn't appear!alt text

3.jpg (237.0 kB)
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 KrzysztofTMu · Feb 23 at 08:22 AM 0
Share

I think you should work on your question because it looks like 4 questions in one thread.

0 Replies

· Add your reply
  • Sort: 

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

177 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 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

If Mouse cursor is above an object, start animation (without click on It) 2 Answers

How to make multiple buttons 0 Answers

disable UI button 4 Answers

Does the sequence in which I keep the objects in a scene matter really? 1 Answer

How to change the position of a button? 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