[SOLVED]Push out at angle

Get help using Construct 2

Post » Sun Jan 03, 2016 9:01 am

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.
Last edited by ultrafop on Mon Jan 04, 2016 4:55 am, edited 1 time in total.
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Sun Jan 03, 2016 10:27 am

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.
B
15
S
2
Posts: 28
Reputation: 1,375

Post » Sun Jan 03, 2016 9:03 pm

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"?
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Mon Jan 04, 2016 4:55 am

Used tutorials and examples of raycasting to determine the angle of my object/player and move it accordingly.
B
42
S
26
G
22
Posts: 307
Reputation: 15,141


Return to How do I....?

Who is online

Users browsing this forum: ivosb, Moordhuis, omnipaws, oosyrag, Youtopize and 8 guests