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 youngapprentice · Dec 21, 2012 at 04:03 PM ·

'Sticky' cursor

Hi, all!

I was wondering if anyone had a clever idea as to how to create a 'sticky' crosshair / mouselook.

I'm not searching for a 'Lock On' function - just a partial one. Like, when a player hovers over an enemy, it's just a little more difficult to keep the cursor from following it. Like, the player would have to aim, say, x units in any direction away from the enemy to get the camera and cursor from focusing on it.

I feel that this would greatly increase my game's playability.

So. any ideas?

Thanks! - YA

Comment
Add comment · Show 2
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 TheDarkVoid · Dec 21, 2012 at 05:21 PM 0
Share

are you looking for something like aim assist

avatar image youngapprentice · Dec 21, 2012 at 06:14 PM 0
Share

Yes that sounds just about right. It's not exactly 'autoTarget', but it just makes being accurate a little easier.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by TheDarkVoid · Dec 21, 2012 at 09:04 PM

What you could do is when your cursor gets near the target you set your cross-hair to the target but not the cursor and when the cursor gets out of a certain range then you set the cross-hair back to the cursor.

Comment
Add comment · Show 5 · 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 youngapprentice · Dec 21, 2012 at 09:25 PM 0
Share

Hmmm... Yes I guess that there is my problem. The cross-hair IS the cursor, and the camera has a mouselook. I have to believe that someone has wanted this in their game before... :/

avatar image TheDarkVoid · Dec 21, 2012 at 09:45 PM 0
Share

then you can slow the camera's tracking speed while the cursor is within the target

avatar image youngapprentice · Dec 21, 2012 at 09:58 PM 0
Share

That might work. I'll try it out and post results. Thanks!

avatar image youngapprentice · Dec 21, 2012 at 10:04 PM 0
Share

It seems that I cannot communicate between my unityScript and my c# mouselook...

avatar image TheDarkVoid · Dec 21, 2012 at 10:46 PM 0
Share

use the Send$$anonymous$$essage function

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

10 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

Related Questions

A node in a childnode? 1 Answer

Ref modifier 1 Answer

Silly question, doing nothing? 4 Answers

Performance cost in code 0 Answers

Unexpected symbol 'public'. (97,22) How to fix that? 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