News Forums RAIN General Discussion and Troubleshooting Evading other characters

Tagged: 

This topic contains 2 replies, has 3 voices, and was last updated by  Shimakaze 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40414

    johnscape
    Participant

    So I have been working on a game, where you can controll multiple characters. The problem is, when I order a character to move elsewhere, and another character is in the way, he won’t detect it, and bumps into. My solution is using OnCollision, and if he collided with another character, he moves away from it. But isn’t there an easier way to do this?
    (sorry for bad english)

    #40418

    blockcipher
    Participant

    Check this

    http://rivaltheory.com/forums/topic/avoid-collision-with-other-playersai/

    There’s another thread where a RigidBody is added and it uses an ObstacleMotor but I couldn’t seem to find it using search.

    • This reply was modified 2 months, 2 weeks ago by  blockcipher.
    #40423

    Shimakaze
    Participant

    Absolutely, no.
    The common way is that you are mentioned above.
    Of course, you can use Sensor to search characters near by, and then check their distance.
    However, physics system, which usually implement Octree or another spatial splitting algorithm, is efficient in general.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.