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
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
I am looking to get the speed of an object with physics being shot out of a cannon and cant seem to work it out, here is a capx of the general idea, any help would be greatly appreciated.
Develop games in your browser. Powerful, performant & highly capable.
Speed = Distance/Time, so you need to determine the distance traveled by the cannon ball in a specific period of time, like every tick.
Here is a modified capx: dl.dropbox.com/u/38038537/Speedofball_modified.capx
This was just a quick and dirty example, and I'm sure there must be a more elegant solution (perhaps even built-in).
thank you, that helps alot!
The physics expressions 'velocity x' and 'velocity y' are probably what you are looking for. I am not sure how to combine them to give you a good indication of actual velocity but it can't be that hard (most of the people hare are maths geniuses anyway ;) )
distance(0, 0, velocity_x, velocity_y)
will give you the speed.
angle(0, 0, velocity_x, velocity_y)
will give the direction.
See? I knew there would be a more elegant solution.
Here is the capx again, with R0J0's information:
awesome thank you guys for the help i am really enjoying this program, and the community!
This is exactly what I was looking for, thank you. I never thought of using velocity like that. Totally makes sense.
The link doesn't work, can you replace it? thanks
Hi Wastrel, can we get the working capx back, please? I'm looking for the same information and — didn't alert you before, thanks in advance!