without seeing the rest of your code, we can't tell what you're doing but you can apply the same method as in this post: construct.net/en/forum/construct-3/how-do-i-8/checking-moving-direction-path-159312
just replace sprite.pathfinding.Movingangle with sprite.bullet.angleofmotion
Develop games in your browser. Powerful, performant & highly capable.
I thought the obstacle map was only generated on layout start, unless you are calling it to regenerate when you spawn that specific object? If so couldn't you use regenerate region to cover the area you want?
You can check their movement angle and use it to determine if you mirror or not.
e.g.
Might be better to post in the C2 forum.
Its likely not a mistake (bug). It sounds like your main scene requires 100% CPU usage on load based on what you are asking it to do. You can use the CPU profiler tab in the debugger to narrow down where the usage is coming from. You can also disable certain events that happen at start of layout until you see your usage drop, so you can find what the problem events may be.
Try this
If you need to do it for multiple objects use a family
construct.net/en/forum/construct-2/how-do-i-18/swipes-move-object-102214
No one is going to be able to help with this unless you post your project file.
use the browser object and use "close".
if you are using Y-1 then it will go up. If you use Y+1 it will go down.
1drv.ms/u/s!AkmrWgxeuxlKhIdtK-WtIlVlBvH2pQ
Here you go. But yeah, could easily be an effect.
Have a look at this. I think it's what you're after, although the piston is moving horizontally in my demo.
1drv.ms/u/s!AkmrWgxeuxlKhIdsNqjrCRCfnOmV4Q
Every tick - Sprite A - Set Y to self.Y-1
increase the number to move faster
to smooth it out when using larger numbers use:
Every tick - Sprite A - Set Y to lerp(self.y,self.y-10,0.5)
again, increase the -10 number to make it faster
There are so many ways to do this. What kind of movement are you after?
You can do it without behaviours but I'm guessing you want to use the moveto behaviour.
Give the sprite you want to move towards the other that behaviour and then use:
every tick - Sprite A - Move to Object "Sprite B"