Need help with ricochet

In my game I want an enemy actor to bounce around the screen. My problem is getting the actor to not try and keep going in one direction. I want the actor to bounce around continuously off all the walls.

Comments

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

    @jessiebnyc said:
    My problem is getting the actor to not try and keep going in one direction

    Use the collide behaviour and have the actor collides off the walls.

  • jessiebnycjessiebnyc Member Posts: 6
    edited August 2015

    I can make it collide off. The problem is the initial movement. If I tell it to move or accelerate in a certain direction it will try to keep going that way after it collides instead of bouncing around the screen

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

    @jessiebnyc said:
    If I tell it to move or accelerate in a certain direction it will try to keep going that way after it collides instead of bouncing around the screen

    Would you be prepared to reveal the code that makes your project behave as it does ? :wink:

  • jessiebnycjessiebnyc Member Posts: 6

    Sure. I'm not very far into the game anyway

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

    @jessiebnyc said:
    Sure. I'm not very far into the game anyway

    . . . . ok . . . ?

  • jessiebnycjessiebnyc Member Posts: 6

    I'm on my phone right now so i can't right this moment

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

    @jessiebnyc said:
    I'm on my phone right now so i can't right this moment

    No problem, the more detailed and precise information you can give the better !

  • jessiebnycjessiebnyc Member Posts: 6

    I'm on my computer. How exactly do I share it on here

  • jessiebnycjessiebnyc Member Posts: 6

    Do I screen shot or can I share the file?

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

    @jessiebnyc said:
    Do I screen shot or can I share the file?

    Whatever you feel is most useful !

  • GnarlyGnarly canadaMember Posts: 840

    You want random bouncing like this?
    https://geo.itunes.apple.com/ca/app/eat-more-dots/id1029736825?mt=8

    Did you try change attribute self linear velocity x 200. Or could be Y. Numer is the speed.

Sign In or Register to comment.