How do I check for the range of angle of motion?

0 favourites
  • 12 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • How would I check if the Player is moving at a range of motion like between 315-45 degrees?

  • The is an event called "Is between angels" which compares if the object is between two angles.

  • The is an event called "Is between angels" which compares if the object is between two angles.

    Thanks cvp, but I'm not sure how to get that to work with the bullet behavior. The helicopter still only tilts in one direction.

    I've attached a link to the C2 project with just the helicopter. I'm a bit desperate because the game is suppose to be a gift for my nephew and I've been trying to get the tilt to work for weeks. I'm going to give it to him either way, but it would be nice if I can get the helicopter to behave a little closer to a real one. He loves helicopters!

    If anyone can fix the tilt for me to work with the bullet behavior controls, I'll return the favor by doing some artwork for them. Maybe a logo or something? I'm not the best artist, but some people like my stuff. Offer only good until 12th because his birthday is on the 13th.

    Rescue Copter

  • RamPackWobble

    Awesome! That's pretty cool how you achieved it. You have me thinking of events in a different way. Thanks!

    My nephew is going to flip when he sees this. PM me with whatever you want in return. I'll get started on it tonight. I can draw a little better than what I let on in the example. It only took me 8-10 minutes to make those sprites.

    Thanks again!

  • I had another look at your code and there is a much easier way - updated the capx - same download link as above. You already had an x offset amount for your joystick so I have just taken that that offset to set the angle.

    Just in case you were very quick I messed up the save location (saved to desktop not dropbox !) - if you got the same file as before then please try again.

  • RamPackWobble

    Wonderful! The rotation is a lot smoother now. Thanks for that.

    I want to return the favor for helping me out of a bind, so please contact me within the next few days about what you want done. I can design a studio logo or redesign an existing game logo, an illustration or some game art. I'll create something nice for you.

  • Hi All,

    RamPackWobble

    I see that here you achieve exactly what i'm looking for, a way to make a helicopter to tilt in the direction of movement, but the link to the dropbox is down, anyone here that can refresh the link? pleaaase, I'm really going crazy here

    Thanks in advance!

  • RamPackWobble

    You are awesome! Thank you! Really!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi again, sorry to bother you so much, but I'm trying to use the example you give me and I'm not able to make it work. I mean, I copy the exact events into my project, set up everything exactly as it was in the example but the touch pad just won't respond. I really can't see what I'm doing wrong.

    If you can help me I would really appreciate the help.

    Here is the game:

    https://www.dropbox.com/s/mdk7dh2g61c1i ... .capx?dl=0

    Any suggestion would be nice, I'm stuck here.

    Thanks!

  • I figured it out, no need to worry, it was just that the layer didn't have the same name that the one being expected in the events, it was "Control" instead of "Controls".

    Thanks!

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