Make Actor Follow Path

JamesBoucherJamesBoucher Member Posts: 433
edited November -1 in Working with GS (Mac)
I have a racing game that I need to create two actors to race against. I need the actors to follow a path. The actors may bump into other actors that are moving or stationary. I also need them to turn (face) the correct direction that they are moving.

I've looked at the Move To behavior but this does not work as needed. Any ideas?

Thanks.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Use invisible actors as turning triggers. You will need one actor per direction (4 or more if you are doing diagonals) and preferably a different image for each direction unless you are looking directly down on the race track in which case you can adjust the rotation of the main image.

    In the car have a rule that sets the inital velocity.
    Then have a rule that says when collides with invisibleLeft
    change velocity left

    do this for all the invisible turn triggers just put in the correct angles. Or create one turn actor and make changes to the individual instances in the scene. That may work better.

    This could work well or be very tedious depending on the shape of your racetrack.

    You may also want to use the random setting in the expression editor. So if the computer controlled car gets to a turn you use a rotate to and instead of giving it the exact angle give it a narrow range so that it still gets where it needs to go, but gives the player a slightly different race experience each time he or she plays it.
Sign In or Register to comment.