one rotating cog that the player will be able to stand on or get pushed off etc...One rotating cog, or a few that connect?
Either way, as stated above, a system which simulates the effect of a cog(s) without actually using real complicated cog collision would work much better.
Look at that picture.
Yes thats what I meant. I will try your suggestion when I get home. Thumbs upI believe these other suggestions aren't actually about what your trying to do.
I mean yes, you could separate the teeth from the circle portion, and perhaps that would allow to avoid precise collision checking... but
Look at that picture.
Do your suggestions have any implications that I didn't already cover for this type of thing?
I don't think he's trying to have connected gears with different sizes, teeth count, etc.
You could always avoid using a collision mask and just use data / math to calculate collisions.
However, I was thinking this is actually a pretty good time to use a precise mask (and switch to no mask when player's not near to optimize as I suggested). Would you agree?
This one's definitely better, there's a lot of potential of lag and error with the many tiny blocks. All you'd need is some set up regarding moving/rotating platforms.That's just one method.
In the end, the smoothest / most optimized way of doing it would probably be to treat the teeth as separate from the inner circle.
You could create and test the rotating platform separately from the inner circle collision and mess with them until you get each to a place you like.
if(place_meeting(x,y-1,obj_player)){
with(instance_place(x,y-1,obj_player)){
var _p1x = x;
var _p1y = y;
var l=point_distance(other.x,other.y,_p1x,_p1y);
var d = point_direction(other.x,other.y,_p1x,_p1y)+other.rotSpd;
x = other.x + lengthdir_x(l,d);
y = other.y + lengthdir_y(l,d);
while(place_meeting(x, y, other)){
x += lengthdir_x(1,d);
y += lengthdir_y(1,d);
}
}
}