How do I create arrows

0 favourites
  • 8 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi guys I have a bow and a arrow mechanism for my character but what I would like is when I shoot an arrow up it will eventually curve back down of shoot back down depending on the angle I shoot it at. Does anyone know how to implement this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could do this a lot of ways... the easiest way would be to use physics plugin for your arrows and it will handle this by itself. You would just have to set the parameters for things like gravity etc, until you are satisfied with the behaviour.

    You could also do this using the QARP expression. There are a few examples of using QARP floating around, but you can also read the manual entries about QARP as well. I would link you, but I'm at work and not supposed to be forum posting right now, lol!

    ~Sol

  • SoldjahBoy Hi dude I have tried this but it doesent quite work I imply a troque towards the ground and the arrow curves like I wanted but when I shoot the arrow to the right it doesent curve for some reason

  • You need a "heavy" end of the arrow... you could try making the arrow head one object with a little more mass than the rewst of the arrow... attach them together with a hinge/joint... and presto (maybe?).

    You could do it mathematically using QARP to make a nice arc based on some level of "power" from the shot (a bit like scorched earth or similar games where you pick an angle and a power).

    There's probably other/better ways to do this... but I'm a redneck engineer xD

    ~Sol

  • Use the bullet behaviour and change the gravity value.

  • videf this sounds interesting. How do you change the angle though gradually so it looks quite smooth?

  • videf this sounds interesting. How do you change the angle though gradually so it looks quite smooth?

    My clunky way (hopefully will come along and will show a more elegant way):

    create variable (number)
    
    every 0.1 second:
    [ul]
    	[li]variable = variable + 1[/li]
    [/ul]
    every tick: 
    [ul]
    	[li]self.angle+variable[/code:g2bd09m1][/li]
    [/ul]
  • https://www.dropbox.com/s/pn6n2e2hqewquc1/Dynamic%20arrow.c3p?dl=0 Hi guys heres a working capx and thanks for everyone who helped me on this cool affect!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)