Hi I have setup road like in this image and green is car.
I want to move car with finger using moveto behavior. I touch on car and move my finger on road will move my car but problem is car moves to only single road not changing road. How do i do this?
Note: without using behavior car changing road perfectly. I just added behavior and then its not working as expected
Looks like it's because at the corners it's overlapping 2 different roads at the same time, you'll need to add in additional condition/s to make the difference. Perhaps after overlapping add Pick Nearest - but that'll depend on the origins.
Nope its not working, its not picking
Develop games in your browser. Powerful, performant & highly capable.
Here's a baseline dropbox.com/s/epnp1zd0ljrwc5j/car_MoveTo_roads.c3p
It would need more conditions for the intersections.
Although I would look into bounded drag and drop addon/behavior instead of the moveTo if it's always requiring user drag input. Or even the tween behavior, I feel gives you more control.
okay thanks FromChris
I will try this.