[SOLVED]Push out at angle

0 favourites
  • 4 posts
  • Hello all,

    So I've been tinkering around with C2 and came across a problem I'm not sure how to solve.

    My desire is to have an object inside of a curved sprite (like a circle) pushed outward at an angle from the center of that curved sprite (dependent on it's own position relative to the center). My goal is to have this object to be able to move along the outer edge of that sprite. My geometry is pretty bad since I've been out of school for awhile but I feel like I need to do something with sin, cos, and tan here...just not sure what. I've looked around and raycasting might be helpful? It looks a bit arduous but I'm interesting in learning anything that can be linked or offered.

  • So... you want that object to be able to move around the circular object ?

    If that's the case, try to change the base point of the object inside, it base will be attached to the circular one, then, if you play with the angle, you will be able to make it move around, or make it look like it turns around.

  • Hey, thanks. I'll try to figure that out but I must confess that I've been out of math classes for 10 years lol. I'm unsure about how to do that. Would this be as simple as "Setting Position to Object"?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Used tutorials and examples of raycasting to determine the angle of my object/player and move it accordingly.

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