Making a wandering object turnaround when hitting wall

by user3513743   Last Updated January 13, 2018 09:13 AM

Im doing steering behavior and when it hits the wall, it will not turn around. It bumps it about 100 times before turning around. I used this code so far

if(BBB.x < -45)
    {
        BBB.x = -45;
        world *= XMMatrixRotationY(180);
    }

Tried to make it do a 180 but does not work. What should I do?



Related Questions


Simple wander steering behavior question

Updated January 04, 2018 20:13 PM

Wander steering Behaviour jittering

Updated May 03, 2017 21:13 PM

Wall avoidance steering

Updated February 27, 2017 14:13 PM

Steering Behavior Seeking

Updated June 23, 2017 05:13 AM

Steering Behavior Seeking code malfunction

Updated June 24, 2017 12:13 PM