Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Please do not yell at me, this is my first project.
I am trying to give a boat behavior on a 2d plane.
It does not turn, it does not go up or down, I just want it to go left and right.
Does anyone know how I can do this?
Have you looked at the sin behavior? Or did you want more of a ferry-across-the-river type movement?
I did look at Sin, it is what im using to make the boat bob in the water. It should be left and right, like the paddle in breakout or arkanoid.
You can use the 8-direction behavior for this. It lets you allow only up/down movement or only left/right movement in the "Directions" setting. You can also turn off rotation as well by setting "Rotation" to none.
Develop games in your browser. Powerful, performant & highly capable.
you can easily program this with events:
key left is down> set .x to .x-1*(timedelta*60)
key right is down> set .x to .x+1*(timedelta*60)
Since it's a boat you might not want to use jerky movements.
key left is down>
set .x to lerp(.x,0,1-0.5^timedelta)
key right is down>
set .x to lerp(.x,displaywidth, 1-0.5^timedelta)
Thanks for everyones help. I got it exactly how I wanted it with the 8 way directional, and then removing the rotate and up and down.
This is my first game and I know I'm going to need a lot of help so thank you in advance.