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 MoDow · Dec 01, 2017 at 02:08 PM · camera movement3rd person controller3rd person cameramouseorbitmouse follow

3rd Person Movement / Camera Control Help or Advice Needed

Hey,

I'm relatively new to Unity and the forums (so I apologize if this question is a rookie one). I have a problem that I've been stuck on for days. I've looked through many YouTube videos, Unity forum posts etc and I just can't find what I'm looking for. I'll try my best to explain it...

Me and a friend are creating a modified replica of the indie steam game "What the Box?" for a school project. For those of you that haven't heard of this game, here's the link which shows the type of 3rd person movement that I'm trying to replicate.

What the Box?:

https://www.youtube.com/watch?v=LWiVoVdL9ig

So at the moment, the camera is positioned behind the player box. The box rotates horizontally using a mouse follow script and the WASD keys move the box forwards or backwards depending on where the character is facing. The box can also strafe sideways. So the problem that I'm having is, I have no vertical movement associated with mouse movement. I don't require a full vertical orbit of the box, just a slight orbit to provide enough of a view over the top of the box so that the player can shoot uphill.

Any tutorials, guides etc mostly use the Unity Standard Assets third person controller which is not what I'm looking for (all of the guides that use Ethan are focused on humanoid movement for replica shooters like Counter-Strike). I haven't found anything regarding the type of movement that I need and I'm really stuck at this point.

Here is an image & GIF of the stage I'm at and the problem that I am facing:

Image: https://i.imgur.com/8e0yNPE.png

GIF: https://i.imgur.com/7z6CS5E.gifv

(Note how the camera has no vertical mouse movement (which I also need) - only horizontal).

The scripts that I am using are as follows:

Attached to Camera:

https://pastebin.com/pzfWz8ys

https://pastebin.com/CKCtwm8u

Camera Inspector:

https://i.imgur.com/nbSZJR4.png

https://i.imgur.com/09VIlF4.png

Attached to Player:

https://pastebin.com/gm2pfbec

Player Inspector:

https://i.imgur.com/vWEGZYi.png

https://i.imgur.com/09VIlF4.png

In the past I managed to get the vertical movement working but it would tilt the actual box (player) in the game to look upwards or downwards and break the horizontal mouse movement completely; I wanted to freeze the box but just have the camera orbit up and down but I couldn't figure out how.

Any help or advice would be greatly appreciated! I'm still learning so I'm sorry if me or my friend made some rookie mistakes.

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
0

Answer by MoDow · Dec 01, 2017 at 02:11 PM

Sorry for the poor formatting; I thought "& nbsp" would create spaces between lines (like it shows on my post preview) but I can't figure out how to do them on this forum!

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

121 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

Related Questions

Need help with a 3rd person Camera 0 Answers

My character moves according to global Vectors 1 Answer

3rd person movement with camera between platforms with gravity 0 Answers

Help With Camera-Dependent 3rd Person Control 0 Answers

3rd person movement not going with position of camera,3rd person character not moving to the direction with the camera 0 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