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 Nawash 1 · Aug 17, 2010 at 01:48 PM · cameracharactercontrollerswitchorientation

setting a character controller orientation by script

Hi I hope I am not asking a dumb question...

I am creating an application in wich I use 3 cameras : a fly camera (the user is free to fly in the scene), and 2 character controller based cameras. I switch from the fly cam to one of the character controller camera using a trigger (collider set as trigger) At the beginning of the scene, the character controller is inactive and got an initial orientation (let's call it Orient0).

When I switch to this camera the orientation is the initial orientation. I walk around, put the character controller in a specific orientation (let's call it Orient1) and switch back to the fly cam (pressing escape key) I fly around and re enter the trigger.

The character controller is, at this time, in the Orient1 orientation. Why ?

I have tried everything (store the initial orientation, restore it the FPSWalker.js script with a frame delay, without a frame delay, restore the orientation before the camera activation, after the camera activation, with 2 frames delay, outside of the FPSWalker.js script) the character controller camera is always in the orientation (Orient1) the character was before switching back to the flycam.

Anyone got an hint ? an explanation ?

Thank you

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 Wolfram · Aug 17, 2010 at 04:08 PM 0
Share

I don't understand your question. You leave the char in Orient1, switch to the fly cam, move that cam around (and therefore NOT the char controller?), and switch back to the char cam - which obviously hasn't moved and ist still at Orient1.

avatar image Nawash 1 · Aug 19, 2010 at 04:46 PM 0
Share

when I switch back to char cam, I set the orientation (to "Orient_that_I_want") of the character controller (tried before and after activating it) but the orientation is not modified. The orientation is still Orient1. I am still puzzled.. does this make any sense to you ? Is there an orientation cache system upon activation in the "not all source code accessible" character controller ?

avatar image Wolfram · Aug 26, 2010 at 10:30 AM 0
Share

It is almost impossible to answer your questino without seeing some of your code; especially how you switch back to the char controller and set the orientation. Also, how exactly do you "switch" between cameras? With c.enabled? or c.depth? some other way? How exactly do you navigate your char / char controller)? If your fly cam doesn't have a char controller, how do you navigate that? Or is it fixed? Or does it follow the char?

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by mike f · Aug 19, 2010 at 10:56 PM

related - does anyone have a controller for flying? or moving in 3D versus on terrain?

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 Wolfram · Aug 26, 2010 at 10:32 AM 0
Share

This is not an answer; please do not ask new questions inside other questions (even when related). Just ask a new question - it is much more likelty to be noticed.

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

No one has followed this question yet.

Related Questions

Singling out mutiple Character movement 3 Answers

Swapping Cameras Disables Keyboard Input 3 Answers

How can I change the character beign controled and the camera with a button? 1 Answer

Camera shake 2 Answers

character switching on collision 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