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 matthewhoyes18 · Aug 07, 2013 at 03:58 PM · rotationtransformpathtrack

How to effectively make a "rail-driven" movement along a path with a little user control?

Hey everyone,

So my question is: How can I effectively make a "rail-driven" movement along a path with a little user control? Meaning, I have an Oval Track (Running Track) and I want to have an object (character) consistently run around the track on the same path.

Let me break it down a little further. I basically want to make a game slightly similar to Temple Run type endless runners, however it's on a track instead of dynamically generated environments, and it's not endless. I do want the ability to shift from the middle of the track to the inside or outside lanes though.

The implementation for this has not been too clear to me since it can't be fully rail-driven, meaning I can't use iTween (Tried that already) because I want the player to be able to jump and slide, as well as move from center to left or right.

I have tried a few different ways of attempting this but nothing has worked out how I like it so far. I've tried using iTween paths, I've tried using triggers to tell the character when to begin rotating at a certain interval while still running forward, until the character hits another trigger to stop the rotation (Going from running on the straight part of the track, to the 180 degree corner).

If anyone has any advice, or have done a similar implementation for a game they've worked on in the past, please let me know if you can help me. I'd greatly appreciate it!

All I need to establish is how the character will run consistently on the path, with user control, but always running forward. The other parts of the game will fall into place after that.

Thanks!

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 gardian06 · Aug 07, 2013 at 05:06 PM 0
Share
  • what is it supposed to do that it doesn't? (this feels like you are asking for the whole thing)

  • what does the user control? (do they get to deter$$anonymous$$e the lane they are in, the rate they turn, how fast they move?)

  • what have the implementation you have tried been missing?

  • if the player has "control" then why not just have the player just control staying on the path? transform.rotate()

avatar image matthewhoyes18 · Aug 07, 2013 at 05:19 PM 0
Share

What it's suppose to do is go around the track (on it's own), constantly running forward, which is the issue I'm having..Hence the question.

If the user control wasn't clearly defined, basically, the user controls only left, right, up, down input. Left meaning moving from the right side of track to center or center of track to the left side. Same with Right input. Up and down input would be for Jumping (over hurdles or obstacles of some sort) and down would be for ducking, or sliding under obstacles.

They get to deter$$anonymous$$e the lane they are in by the left, right input. They don't deter$$anonymous$$e the rate they turn. That is driven by the path (which this question is posing), and how fast they move is deter$$anonymous$$ed by the progress (distance) they have traveled.

The implementations I've tried have been missing a few things.

With iTween, I'm restricted and can't implement the jumping/sliding mechanics, and the constant rotation implementation was too inaccurate and overtime causes the player to run a slightly different path each lap.

To answer the last bullet, they have "semi-control", not full control. They don't control the running, so the player doesn't control staying on the path themselves because of it.

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

Move an object toward an angle in 2d space 0 Answers

Syncing Position and Rotation data in ECS tests? 0 Answers

When I rotate my player in open 3 space, the transform rotation component keeps snapping back to origin. However, when I disable my rigidbody.rotate command, the transform rotation works just fine. 0 Answers

Rotating Camera around player object 0 Answers

rotation of the object to a given angle 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