playMaker

Author Topic: creating seamless roads at runtime  (Read 1517 times)

nepomuk

  • Playmaker Newbie
  • *
  • Posts: 32
creating seamless roads at runtime
« on: May 12, 2014, 04:07:13 AM »
i'd like create some very simple kind of endless runner. to keep a good performance i'd like to create the road tiles from a script.
the player stays at position 0, while a parent object of the road moves negatively in the z direction.

i tried a couple of things.. for example:

i store the position of the parent object und substract the tile length and save it in the variable.
i check the z position of the element every frame and as soon as the position is lower than the z position of the saved variable the script creates a new object.

the new object itself sets the parent object of the road as it's own parent object in order to move along with it.


the problem is that it does not really turn out to be a seamless road seamless.
sometimes theres a small gap, sometimes the elements overlap.. depending on the performance(?).



i'd like to have some tips in order to get this done.
« Last Edit: May 12, 2014, 04:18:13 AM by nepomuk »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: creating seamless roads at runtime
« Reply #1 on: May 15, 2014, 12:51:22 AM »