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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Method of scattering objects along spline joebain 1 3 11-26-2024, 03:20 PM
Last Post: _Aka_
  making objects solid cielpandapie 1 3 10-18-2024, 12:17 AM
Last Post: _Aka_
  Bug: Save Generator Outputs still saves outputs if object is disabled curvymesher 1 3 08-30-2024, 09:19 AM
Last Post: _Aka_
  Player move with object mcarman 4 8 07-29-2024, 06:49 PM
Last Post: mcarman

Forum Jump: