Random actor movement

justinodunnjustinodunn Member, PRO Posts: 226

Hi, how do I make an actor move randomly? As for movement I'm not talking about changing basic x and y directions, I'm talking something like Agar.io here (). Smooth movement? Thanks.

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @justinodunn -- the movement does not seem random to me. It looks as if it is following the cursor. And the other players movements are not random either. They are being steered as well.

  • justinodunnjustinodunn Member, PRO Posts: 226

    @RThurman said:
    @justinodunn -- the movement does not seem random to me. It looks as if it is following the cursor. And the other players movements are not random either. They are being steered as well.

    Hi yes I know I just posted the video to show the kind of movement that the AI should have. Smooth and doesn't rapidly change.

  • SocksSocks London, UK.Member Posts: 12,822

    Make a 'real' attribute, let's call it 'A'.

    Change A to random (0,360)

    Constrain Rotation to 90*sin((time*20)+A)+40*sin((time*((A/100)+10))+A)+22*sin(time *111)+37*sin(time*87)

    Move / Direction 0 relative to actor, Speed 100.

Sign In or Register to comment.