Route with lines


can someone give me a way to do this in a smart way, I did something to test it, but I wanted a way, any tip would already help me

Hi @vgupgrade,

If you would like a quick way to draw a path for debugging you can use the renderLines() available here:

Otherwise for a more production ready solution you could use the pc.Curve class by inputting your path points and getting in return linear access to any intermediate point. Where you can easily place dummy spheres or any other entity to visualize your path.

On how to use pc.Curve with path points check the following example:

1 Like

I liked the pc.Curve thanks.

to create the points, I’m using:
resource.instantiate ();

so I’m applying force with:

in each collision I create the point:

am i doing it right or is there a better way in playcanvas?

are you looking for something like this from lexxik:
ball with footprints

@LeXXik I mean the one with the jumping ball, which leafs collored stars on the ground; but he ask for lines :thinking: I guessed the idea from the picture

1 Like

@Gurki not sure if your link is correct, but that is not my example. You probably meant this one?


hi guys, this one is an example, that i found on the web, when colliding i wanted to show the way the ball would trace.


Assuming the bounce is perfect, you can use raycasts instead and place spheres along the direction and path of the raycast.

1 Like