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 ratboy · Mar 30, 2012 at 05:23 PM · 2dspritesjoints

how to create an extendable boxing glove on a spring?

Hi, Ive been at this all day and it won't behave in the right way.. i have a 2d game, and duplicates of a short metal joint, which I have criss crossed over and attached with hinge joints, to a kinematic base unit off the game screen, with a boxing glove sprite at the other end, I have managed to get the spring to behave properly in terms of it bouncing around gently and reacting to any bumps etc, but i need it to extend out, and then stop at a certain distance.. any ideas would be greatly appreciated as I'm running out of ideas... :)

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 kromenak · Mar 30, 2012 at 10:15 PM 1
Share

Not an answer because I'm not sure if it will work, but have you tried applying a force to the boxing glove? If the boxing glove is attached to the rigidbodies of the metal bars, and the glove has a rigidbody itself, if you apply a strong force to it, I imagine it would behave the way you are expecting by pulling the spring part?

You might also want to investigate SpringJoint, unless you've already found it to not be suitable.

avatar image ratboy · Mar 30, 2012 at 11:46 PM 0
Share

yes i did try that and it sort of worked but it didn't pull out far enough, so maybe i need to try to play with the limits of the hinge joints so it extends further.. is that possible?

2 Replies

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

Answer by ratboy · Apr 01, 2012 at 10:00 PM

silly mistake, i ended up using the limits on the hinge joints and increasing each max to 90 degrees, then adding springs through the middle.

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
avatar image
0

Answer by reptilebeats · Mar 31, 2012 at 12:11 AM

qhat i would do is animate it all, then i suppose you could add randomness to it though different animation points. however i dont know what game your making

soo another way you could do it is just lock its position for a brief time at the point you want so when its so far out lock positions and then enable again or beter still make it kinematc instead quickly.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

How to swap sprites? 1 Answer

Help on a 2d game. 1 Answer

Best 2D plugin for my needs 0 Answers

Circular 9 slice? Draw a circle with constant thickness 1 Answer


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