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 FrowningPigeon · Jul 16, 2013 at 04:26 PM · collisioncharacter

Draw an object at a position on a character, and for it to remain there wherever they go...

Hi all,

What I need to to do be able to draw a cube in the characters hands when i intersect it; but without making it a child object. I had this working a little while ago by making the cube an object of the hand on the character when you intersected it. But the problem is, is that i needed a box collider on the cube; so when i did that the charcter controller and the box collider where hitting each other and making my character jitter and jump.

So what I need to know is if there is a way in code to set the position of an object to the characters hand for example, and for it to remain there no matter where I go. So for example I hit the cube, it is drawn at my hand....and then if i move it stays at the hands position. But without making it a child object.....hope this makes sense.

Thanks!

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 amphoterik · Jul 16, 2013 at 04:47 PM 0
Share

@robertbu why not make that an answer?

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by robertbu · Jul 16, 2013 at 04:38 PM

If the box has a Rigidbody, you can use a FixedJoint to connect them. If you game does not depend on the box having an active collider when held, you can turn the collider off when the box is in the hands. If the character is a Rigidbody (not a character controller) you can use Physics.IgnoreCollision() to have the colliders of the box and the character ignore each other.

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 amphoterik · Jul 16, 2013 at 04:50 PM 0
Share

Also, more info on fixed joint: http://docs.unity3d.com/Documentation/Components/class-FixedJoint.html

avatar image FrowningPigeon · Jul 16, 2013 at 05:12 PM 0
Share

Hi, Thanks for the reply this method also worked along side the method i have used. What it was is that i had not set istrigger = true on the cube which was in the players hand. This was causing a jittery motion....thanks for the reply!

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

16 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

Related Questions

Skined Cloth 0 Answers

Two Basic Physic Questions (Gravity and Jumping) 1 Answer

Make the character move a certain direction on collision 2 Answers

How to get a Character to move with a moving platform ? 6 Answers

Prevent a specific RB to influence another, but still collide with everything 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