rotate around an object? 8 direction behavior path??

  • I thought it'd be neat to make an RTS style game and one of the ways I'd manage "units" would be to have them rotate or walk in a circle around the node that spawned them. basically, a unit is spawned and then begins to walk in a circle around the spawn point until given orders.

    Is there an easy way to set an object with the 8 directional behavior to rotate around an object oncreated?

  • Well, I'm not sure 8 direction behavior would be the easiest way to achieve this with. Is there a reason for 8 direction?

    I would probably try to do this with either the Pin behavior, making the sprites simply orbit the node without any particular behavior, or you can try out tanoshimi's Boids flocking behavior for an easy life hack

  • Well, I'm not sure 8 direction behavior would be the easiest way to achieve this with. Is there a reason for 8 direction?

    I would probably try to do this with either the Pin behavior, making the sprites simply orbit the node without any particular behavior, or you can try out tanoshimi's for an easy life hack

    The reason I chose 8 directional is because the rotational behavior is only meant to be temporary. So, the units are created and rotate only as a visual behavior but when they are given orders they stop rotating and move towards the commanded checkpoint using 8 directional movement. If they should park on a new node, I wanted them to rotate again though..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh, I assumed that the nodes themselves would be objects that do the moving, while the units simply trail along. I was thinking to have the unit use Pin behavior to stick to a node, then while node is stationary have it slowly rotate, thus making the unit orbit around it. When a node moves, unpin the unit and have it move after the node, then re-pin once its within a small distance of the node. Though, I would probably use Bullet behavior to achieve this (and Pathfinding behavior if there's any pathfinding required).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)