GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Constraining actor to move within circle?

jrj.clarkjrj.clark Posts: 17Member, PRO

Hi there,

I have a fixed point determined by X and Y attributes.
How can I get my actor to move only a certain radius away from this fixed point?

I know I can use constrain if the actor moves more than a certain distance in the X or Y direction, but this limits the actor's movement to a box shape, not a circle.

Thanks in advance!

Comments

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

    You need to provide more information, is the actor bouncing around the scene using the physics engine, is it being dragged by the player through touch, is it being moved by the player using the keyboard (and if it is then what behaviour is being used, change velocity, move, move to . . . etc), or maybe the actor is static and only moves when a certain attribute is changed . . . etc (and a thousand other posibilities).

  • jrj.clarkjrj.clark Posts: 17Member, PRO

    Thanks for the feedback Socks.

    I have an actor that I want a player to 'pick up' and move to a new location. This is done by the player through touching/clicking the actor and dragging it to the new desired location.

    I only want that actor to be able to move a certain distance from the starting point - and I want that distance to be the same in all directions, hence the need for a circle.

Sign In or Register to comment.