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 KenJammin3 · Aug 31, 2014 at 05:44 AM · spriterenderdynamicline

Creating a arrow string that can dynamically re size itself.

alt text

alt text

So I need to dynamically draw a string based on the distance an arrow was pulled, i'd prefer to do this with a sprite that can dynamically re size itself based on how far back the arrow was drawn. I'd have a raycast going that i had setup with a line renderer but the line renderer really gives me all sorts of weird issues and i want something that has a little bit more of an 8-bit look as i plan to make different looking bows. (Don't mind the slime he happened to jump in the shot when i was taking a picture)

Thank you for any help, or leads.

arrow1.png (88.9 kB)
arrow2.png (72.6 kB)
Comment
Add comment · Show 3
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 robertbu · Aug 31, 2014 at 06:27 AM 0
Share

You can define a bowstring sprite like this:

alt text

And you can use the transform.localScale to make the line nearly straight and the angle as the arrow is drawn back. The problem is that a straight line will be really skinny, and the line will be come thicker the further you draw it back.

bowstring.jpg (28.2 kB)
avatar image KenJammin3 · Aug 31, 2014 at 06:49 AM 0
Share

I see what your saying, I might use this temporarily.

avatar image Vitor_r · Sep 01, 2014 at 01:27 PM 0
Share

You can make 2 game objects cutting the @robertbu image by half. Then you can change the rotation and scale of the image to simulate a sting. Tip: If you change the pivot of a sprite it will scale accordingly, so put the pivot on the top of the sprite and it will scale downwards. alt text

31803-bowstring.jpg (21.3 kB)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by BMayne · Aug 31, 2014 at 05:59 AM

Hey There,

What I suggest is having your bow be an animation. While your drawing the bow it plays the animation. This animation could have the bow bending and the string being pulled. This could be done with a sprite sheet or bones.

Comment
Add comment · Show 1 · 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 KenJammin3 · Aug 31, 2014 at 06:08 AM 0
Share

Yeah making the bow bend as well would be really nice, that's a great suggestion. Wouldn't I have to key out the different animations based on the distance though?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to make Occlusion Culling for SpriteRenderer ? 0 Answers

Drawing a line in a sprite 0 Answers

How to draw a line using script 8 Answers

How to build a line drawing method called in Update, similar to Debug.DrawLine () 3 Answers

Any way to make Animation.Play take effect immediately? 2 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