[Apologies if there's actually a way to do this already that I've missed! Please do let me know if that's the case!]
I've been running into a little bit of frustration, particularly with the Pin behavior. Basically, in terms of order of execution, it seems like behaviours always take place at the end of the (main) event sheet. This seems perfectly reasonable, but it causes problems in cases like the one I have now. Basically, I have objects that are pinned to other objects, which works perfectly fine. The problem is, if I want to have an object set position to, or point towards, a pinned object, there will always be a 1-tick delay. In some cases, it's very noticeable.
As far as I know, there's currently no way to get around this without scrapping the Pin behaviour entirely in that case, which isn't feasible for me as it's a pretty big part of my terrain motion system.
I don't really know what would work well in terms of a solution. Ideally, we'd be able to override the execution of any behaviour (or, at least, ones prevalent with this issue like Pin) to a specific place in the event sheet. No idea how feasible that is technically, however!
Anyone else run into this issue?
It would be very useful to be able to call the update function of the pin behavior from anywhere and as many times as needed. I've gone the event way before because I needed to do that. So +1 to this request.
Also it is dead simple to add such an action to the behavior, but it's always better if the modification is official.
+1 too, it can be annoying for the pin behavior for this exact reason, which is troublesome if you are not just pinning position and angle.
Dynamically creating a chain of objects and then pinning them together end to end was incredibly frustrating because of this one-tick delay!
Cool, glad to hear it's pretty easy to implement on the technical side!
Develop games in your browser. Powerful, performant & highly capable.
Bump, because I think this is an important feature!
+1 for this. Sorry if it seems obvious, but how can I remake the pin behavior in events?
StaticCloud Really depends on if you need an arbitrary offset or not. If you do it's a bit more complex, but not too hard.
I almost never use pin for this very reason. Easy to 'pin' with event logic, and it works the way I want (same tick).
I'm glad to see this isn't just happening to me! I had to do away with pin and do it manually due to the delay it has.
Just like to point out that making this only work on the Pin behaviour won't completely solve the problem. Any behaviour that involves movement (8dir, platform etc) needs this. Currently you can't 'manually' pin anything to an object with a movement behaviour without a 1 frame delay.
I think I'm having a similar problem, but it seems to get even more noticeable with a spriter object involved.
HereÂ´s an exemplo capx
https://www.dropbox.com/s/ihjebgjixzx8e ... .capx?dl=0
Any help here how to fix this?
I'd love to see Scirra give more control to people of the engine through events. There has been numerous requests regarding engine level features (like controlling the memory management). If needed, put it under a new event category with a warning that this is only for advanced users, but please, do something about these requests if possible. Some developers need that kind of functionality.
Apart from really simple stuff its rare that I use pin because I ran into so many problems with it on my first game tried with c2. I'm just glad its easy to pin something through a quick event.
+1 to this! Pinning to a pinned object creates a weird wobble effect on slightly slower computers. I couldn't figure this out for a long time since it does not happen on my dev computer.