Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing the objects behind an object
#1
First of all thank you for this amazing tool. This is a unique tool. I'm having a lot of fun when using.

I'm making an endless driving game. I am using "Input GameObjects" with a lot of groups inside. When I reach some points I'm moving last point forward to create space for new roads. But while it's creating new ones I want it to remove the ones behind us or behind a point. I tried rasterized path's from to range setting or volume spot's range to setting but these functions moving the first ones forward so these options didn't worked for me. Is there a way for removing or not creating the ones behind?
Reply
#2
Hi
Glad to read that you like the tool, you are welcome.

I would have suggested to use the Range settings from the Rasterized Path module, but you said you tried it but didn't work. How did you implement the solution? Can you send me a reproduction case?

The way I would have done it is to use the CurvySpline.GetNearestTF method to know what is the TF of your point of interest, then use CurvySpline.TFToDistance to convert that to a distance. Next you divide that distance by CurvySpline.Length. This gives you a value between 0 and 1, representing where the point is on your spline. You can set this value (or other similar ones) as the From and To values of your module, that way you define the section you want to rasterize.

Did this help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
I found a solution for that. In create mesh script I added few lines for position check inside spots's for loop. By doing that I stopped object creating behind my object. Will try your solution because I know mine is not the best one. Thanks for your quick reply.  Smile
Reply
#4
I disabled autorefresh and manually refreshing the game when needed. But after every refresh all created objects were deleted and new ones are created after that. Is it possible to disable this feature? I want to create only new gameObjects if they are not already created. If they are already in the scene dont destroy these ones amd just continue to check for newer one if it is possible for creating.
Reply
#5
Hi
In play mode, the objects are not destroyed, but pushed in a pool to be reused later. So the refreshing is not heavy on the garbage collector.
The above process is the same whether the refresh is manual or automatic.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
When it refreshes the roads currently on stage also refreshes, I don't want it to do that. I only want it to create objects that are not currently present on the stage within the volume range I specify in the volume settings. How can I achieve this?
[font=Söhne, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji']When it refreshes the roads I'm on, I don't want it to do that. I only want it to create objects that are not currently present on the stage within the volume range I specify in the volume set[/font]
Reply
#7
Have two generators, one for the objects you want to refresh, and another one for the rest. Refresh only the generator you want.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Line Renderer between two objects on a spline travellinggamedev 1 7 01-13-2024, 10:39 AM
Last Post: _Aka_
  Getting object on spline Position when Spline has coordinates larger than 2000 velikizlivuk 5 10 09-05-2023, 01:01 PM
Last Post: velikizlivuk
  Disable Generator Rasterized Objects SAMYTHEBIGJUICY 3 5 09-01-2023, 03:38 PM
Last Post: _Aka_
  Moving object down or up the spline using gravity velikizlivuk 6 18 07-26-2023, 10:06 PM
Last Post: _Aka_

Forum Jump: