• 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 cdrandin · Jan 23, 2013 at 05:41 AM · modeling

How to make model's arms + weapon follow cursor?

Just like the title says. I currently have my controlling movement working just how I want it to. Now in order to proceed with shooting I first should focus on how the model should look like to determine how my script should act when firing. Currently I am using Unity's Constructor model, but now I need to create my own model just to get the arm movements to follow how I want it to. I have an idea how to make the arms follow the cursor, by adjusting the X and Y axis rotation to follow the position of the cursor, taking on screen coordinates then using Atan to find the right angle. First I have no idea how to make a model, so I guess I need to figure that out first, but how can I make it move like the constructor model from Unity. I have heard of rigging, but still not sure what that is. I have played with C4D when in high school which I noticed while modeling it help provide a human like effect when controlling joints. I am planning on using Blender so if anyone had 3D modeling humanoids video with rigging or skeletal joint or something. Not an artist at all, but I need a model I suppose.

This is a 2.5D platform game, 3D environment with 2D physics.

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 cdrandin · Jan 24, 2013 at 05:11 AM 0
Share

so yeah, was hoping someone had a basic start up on how to approach this.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Loius · Jan 24, 2013 at 06:03 AM

This gets asked a lot. Try searching Answers for 'lookat mouse'.

The simplest solution is using Transform.LookAt (or Quaternion.LookRotation) to make the arm point at the point in the world where the crosshair hits, often found by using a raycast using Camera.ScreenPointToRay. See the Scripting Reference for super awesome details: http://unity3d.com/support/documentation/ScriptReference/index.html

Comment
Add comment · Show 3 · 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 cdrandin · Jan 24, 2013 at 06:20 AM 0
Share

I understand that part, but I guess my most concern is relating back to the actual model. I have done this before with my other 2D game, but 3D is just new to me at the moment. Currently, I am going over some Blender tutorials on how to create a character model and I am just thinking about making it entirely blocked for now. So, block fingers, arms, head, etc.. No idea on how to do rigging, I guess just not sure how to get my model to conform to this free movement. Free movement only to the arms, hands, fingers, etc plus the weapon.

avatar image Loius · Jan 24, 2013 at 05:25 PM 0
Share

Search for a Blender rigging tutorial; there's millions, so try to find one that matches your version :)

The only special concern is, BEFORE YOU START ANI$$anonymous$$ATING, BE SURE THE 'ROLL' OF ALL YOUR BONES IS ZERO. It'll work with non-zero rolls but it's very easy to run into a situation where you'll wish they were zero when you're working with rotation, and changing bone-roll affects animations.

avatar image cdrandin · Jan 25, 2013 at 12:58 AM 0
Share

ok thanks. I'll try getting a decent model up and start that and come back if I need some help.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Creating a sphere thats bumpy without 3d modeling 2 Answers

Can I use Unity to create a demo movie of my game? 4 Answers

What is better for a game character? 1 Answer

Blender Issue -- Textures 0 Answers

i am making a model and decided to place elevator in it but should put the elevator model in blender or inside unity engine 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