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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Gianca · Aug 27, 2010 at 11:52 AM · inputcharactercontrollercamera-movement

camera movements very slow, why!? :)

Hello, Unityrs,

I am working in writing down very simple script for very basic functionalities. Just to learn Unity. So, now I am committed to understand why my camera/carachterController movements are that slow. I created a prefab and attached a cylinder representing my character, then I attached a characterController component to the prefab and I wrote the following script attached to the prefab. But the movements are very slow..., THANK for any help/suggestion.

private var controller :CharacterController; controller = gameObject.GetComponent(CharacterController);

private var moveDirection = Vector3.zero; private var forward = Vector3.zero; private var right = Vector3.zero; var speed = 0.30;

function Update() { / var x = Input.GetAxis("Horizontal") Time.deltaTime speed; var z = Input.GetAxis("Vertical") Time.deltaTime speed; transform.Translate(x, 0, z); /

forward = transform.forward; right = Vector3(forward.z, 0, -forward.x);

var horizontalInput = Input.GetAxisRaw("Horizontal"); var verticalInput = Input.GetAxisRaw("Vertical"); var targetDirection = horizontalInput * right + verticalInput * forward;

moveDirection = Vector3.RotateTowards(moveDirection, targetDirection, 200 Mathf.Deg2Rad Time.deltaTime, 1000);

var movement = moveDirection Time.deltaTime 2; controller.Move(movement);

}

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 matyicsapo · Aug 27, 2010 at 12:09 PM 0
Share

i assume the 2 near the end is the speed, why not just make it public and test some higher values?

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer Wiki

Answer by Mike 3 · Aug 27, 2010 at 12:14 PM

First, try changing the speed value from the inspector

Secondly, it could be possible that you're colliding with the cylinder - try setting the cylinder's collider to be a trigger, or remove the collider entirely

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 Gianca · Sep 02, 2010 at 08:58 AM 0
Share

Colliding with another object?... possible but checking the x,y,z coordinates they were increased very little... likely is the speed value. I'll check that out. many thanks!

avatar image
0

Answer by kami1339 · Jan 25, 2019 at 12:46 PM

No ! 1You cant choose obj file because unity will very slow camera and etc convert them for example with iClone 3DXchange v7.01 Pipeline! 2You must acclusion your camera ! 3Chage size your texture with Advanced JPEG Compressor. 4Change your build setting like my picture.alt text

Your came wil be high speed.alt text


untitled.png (490.7 kB)
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

1 Person is following this question.

avatar image

Related Questions

Player inversed inputs 0 Answers

How can i make my simple character controller rotate? 0 Answers

New input system controller stops detecting on fully pressed trigger? 0 Answers

Collision With Character Controller 4 Answers

I need mouse look and CharacterController.Move to work on the same object 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