Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by subver · Nov 28, 2016 at 06:07 PM · timedistanceperlin noise

Get position of object that uses Perlin Noise X distance/time back/offset?

Not sure if I'm going about this the right way, but I'm looking to get the X position of an object where it WAS either in an amount of distance, time or frames back. I think preferably distance back... but there is another factor (the perlin noise is slowly changing, speeding up)

let me try to explain a little better.

I have objects that are being randomly Instantiated at the x position of an object using this code (this code is on the "wiggler" object that everything spawns from):

 void Update() 
 {
     float movement = GlobalControl.newPathCurveAmount * Mathf.PerlinNoise(Time.timeSinceLevelLoad * GlobalControl.newPathCurveSpeed, 0.0F);
     Vector3 pos = transform.position;
     pos.x = movement - (GlobalControl.newPathCurveAmount/2);
     transform.position = pos;
 }

What I'm trying to do is get the x position of that random perlin noise/"wiggler" object position of where it WAS 500 units back. (The player and camera are at z: 0, the spawner is at z: 500)

I might not be thinking about this right because the spawner is slowly speeding up (GlobalControl.newPathCurveSpeed slowly increasing) and the objects are slowly moving faster and faster (not sure this matters, though.. the path should stay the same think).

My end goal is to have the camera (at z:0) follow the path this perlin noise spawner is creating 500 units back in z space, sort of to show where the player "should have been".

I really hope that makes sense.

Quick detail: the perlin noise is on an object ("wiggler") and I take that X position to spawn obstacles on the left and right, essentially creating a wall of obstacles and a path that the player follows (left and right movement only)... when the player dies I'd like the camera to follow the path that the player "should have been on" - I'm just a little confused how to go about this and not sure if the speeding up of the curve amount will affect this or not? Really don't know how to go about this at all.

Any help or push in the right direction would be great! I'm a bit at a loss. I really hope I explained myself properly!

Thank you so much!

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

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

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

Related Questions

Following the trail of Perlin Noise random movement? 1 Answer

Calculate time to destination taking account current speed, also how to determine distance between two objects? 1 Answer

Type out text in sync with audioclip 0 Answers

How do I do math in unity.(timer/60 and timer%60) 1 Answer

Quick Question 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