Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 harrismak4 · Jul 08, 2017 at 11:56 AM · physics2dtransform.positionjointsmovetowardsphysics 2d

Snake Movement Like in Snake vs Box

I am stuck at achieving snake movement of game Snake VS Box. can anyone help me.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by TheReEvolutions · Jul 10, 2017 at 05:11 PM

They might be using a trail renderer to achieve the effect, Try checking

https://docs.unity3d.com/Manual/class-TrailRenderer.html

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 harrismak4 · Jul 13, 2017 at 08:34 AM 1
Share

how can you add dots in trail renderer or remove it

avatar image TheReEvolutions harrismak4 · Jul 13, 2017 at 12:20 PM 1
Share

You change the whole material.

https://docs.unity3d.com/ScriptReference/Renderer-material.html

or just change the texture using Renderer.shared$$anonymous$$aterial.

https://docs.unity3d.com/ScriptReference/Renderer-shared$$anonymous$$aterial.html

You might also need to change the trail renderer length according to how many dots its has.

https://docs.unity3d.com/ScriptReference/TrailRenderer-time.html

or just have 10 trail game objects all with different amount of dots and then just switch thew them depending on how many dots you need to have .

https://docs.unity3d.com/ScriptReference/GameObject.SetActive.html

avatar image
0

Answer by WinterboltGames · Jul 08, 2017 at 02:31 PM

you can a use a CharacterController and detect the input axis and then use the function CharacterController.Move() to make your snake moves and if you make you question a little bit more clear I would help you out more.

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 harrismak4 · Jul 10, 2017 at 06:41 AM 0
Share

this is video of game. https://www.youtube.com/watch?v=8s3zdyrhvJQ

snake moving is like mechanical snake, but i don't know how to achieve that movement

in this one parent dot, others are child dots and they follows parent.

avatar image WinterboltGames · Jul 10, 2017 at 02:45 PM 0
Share

make a list of Vector3's that represents some points in the local space (the gameObject's space) then make parent gameObject move using a character controller (as mentioned above) then try to Slerp() the child object positions using a for() loop and that's it. hope this helps you

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

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

Related Questions

Set targetjoint2d anchor position at mouse position in 2d 0 Answers

Set connected Rigidbody 2D to a WheelJoint2D via script. 0 Answers

How to make Two colliders, don't collide, but still be able of interact with each others 2 Answers

How to prevent colliders from intertwining when using DistanceJoint2D 0 Answers

How can I move an object to a (0,0) and scale it to (0,0) at the same time? 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