Smooth random move and collide

liux2355liux2355 Member, BASIC Posts: 33

Hello,

I am making a smooth random movement of my actor. I move my actor in a certain speed and change my actor to random angle every 0.1 sec. I can see my actor is moving around randomly.

I also create some walls which the actor will bounce when collide. The problem is that whenever my actor collides with the walls, it behaves strangely (stuck or spin around). I tries to make a rule that when my actor collides with walls, change the rotation to current rotation+180, so that my actor will turn around and continue random movement. But it is still not working.

Is there anyway that I can make my actor move randomly and can still collide with walls. I know I can do random movement by changing the position of my actors, but in this way, the movement does not look smooth.

Thanks.

Go Download "Sub Run" in App Store.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2015

    This might not be perfect (I made it for another forum member's question) but there might be some stuff you can use.

    File attached.

  • liux2355liux2355 Member, BASIC Posts: 33

    @Socks said:
    This might not be perfect (I made it for another forum member's question) but there might be some stuff you can use.

    File attached.

    Working well. Thanks.

    Go Download "Sub Run" in App Store.

Sign In or Register to comment.