• 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 aleem.razzaq09 · Jan 09, 2014 at 07:30 AM · 2dscalingunity4.3

Pull and Push spring on finger moving.

Hi, I am working on 2D game in Unity 4.3. I have spring sprite Image. I want to stick its origin at one position and just increase and decrease its height and I don't need to get worry about its pixelated problem but I just to look like real as we Pull and Push some spring. What approach should I follow, Either do this by changing its scale and rotation but it require too much calculation or there are some good and easy approach for this? I attached my Image, kindly view this and suggest me some better approach to perform this task. Thanks.alt text

screen shot 2014-01-08 at 5.33.24 pm.png (55.3 kB)
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 poncho · Jan 16, 2014 at 02:51 PM

you could use some anchorage points, each spring to white line point as the startpointspring1, startpointspring2, the red point as the endpointforsprings, then get the degree of the 2 points and change the rotation of the springs, for the scale, magnitude diference between those points, could give you the local scale, for the force it will generate, a cuadratic i think it is the best for a spring behavior. some little math, but a real easy coding, good luck and happy coding

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

20 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

Related Questions

How to handle camera view for avoiding jerking. 0 Answers

Moving object show jerks in middle of Image. 0 Answers

After using NGUI, game is not scaling for different devices ??? 0 Answers

2D object flickers when it is in high speed in Unity 4.3 0 Answers

Set images according to their size in Unity4.3 for 2D game Development 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges