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 greg horn · Dec 22, 2010 at 11:02 AM · gravityplanetlocomotionsphericalfauxgravity

Implementing FPS view into locomotion planet walk

Hi

I've been looking for solutions to be able to walk on spheres without falling down, and I stumbled onto the locomotion scripts which pretty much allow exactly this:

http://www.scottpetrovic.com/blog/20...ystem-wsource/

The character is not falling off the sphere, and the camera makes the sphere ground always appear below the player, which is just what I'm looking for. However, in my project I use a first-person view and regular first-person movement control. I assume it should be easier than the standard scripts, as no 3rd person camera movements and smoothing are required. I'm trying to modify the scripts, but I'm rather new to it and I haven't managed to get anything working. I'd greatly appreciate some help, maybe if anyone could provide me with a modified example scene where a fps view was integrated!

Regards,

greg

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by runevision · Dec 22, 2010 at 02:19 PM

This should be rather straightforward:

Make the camera a child of the character and move it to the position you want it to be at (like around the head).

Use a MouseLook script from standard assets or from the UnifyWiki (like this one) - with a small modification:

Instead of rotating around Vector3.up and Vector3.right, rotate around transform.up and transform.right. (Note that Vector3.left (a deprecated variable) is the same as -Vector3.right.)

Comment
Add comment · Show 2 · 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 greg horn · Dec 25, 2010 at 12:58 PM 0
Share

Thanks, the attachment part worked! However, I'm having trouble modifying the mouselook script. When I replace Vector3.up and Vector3.right with transform.up and transform.right, unity concole tells me it doesn't know these commands?

Regards,

greg

avatar image runevision ♦♦ · Dec 29, 2010 at 10:36 AM 0
Share

transform.up and transform.right definitely exist. It's documented here: http://unity3d.com/support/documentation/ScriptReference/Transform-right.html

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

Mario Galaxy -ish controls problem 1 Answer

Multiple Planets with their own gravitational pull 1 Answer

Planet gravity help need guidance no code 1 Answer

walking around a spheroid planet centered at the origin 1 Answer

stitch spheriphied terrain-like (6) planes (removing gaps from edges) 6 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