jobel's Recent Forum Activity

  • updated capx

    once the "X" leaves the dotted circle, the blue pointer jumps(rotates) too fast toward the X, would love to figure a way for the pointer to: ease into the rotation, increase speed midway, then near the end, slow down...

  • R0J0hound I'm trying to use the angle as the last lerp parameter, so that when the rotation makes a smaller angle the last parameter will change... the only probably is the angle gets smaller. I need that number to go up to make an easing-in effect. any ideas?

    I could just make a variable I supposed and add dt to it, but it seems like I would want to relate it to the difference in angle..

    example:

    spriteA angle: 180

    spriteB angle: 0

    rotating sprite A:

    anglelerp(spriteA.angle,spriteB.angle,0.05) - creates a nice easing out effect, but the start is too abrupt.

    instead I'm trying:

    anglelerp(spriteA.angle,spriteB.angle,angle(spriteA,spriteB) / 10000) //works similar unless I can figure out how to get the last number to go up instead of down.

    feels like I should add 180 or something to it... since my greatest angle would be 180? (which I would want to be 0.001) and my closest angle would be 0 (which I'd want to be 0.05).. but so far it's not working.. any suggestions?

    EDIT: I was saying anglediff but I just meant angle()

  • hey man, looks great! congrats on the steam release and positive reviews! I'll be buying a copy!

  • I don't think there is a way to change the backgrd color of the default loader.

    but I would suggest using the default "Progress Bar & Logo". Then just change the logo to your own logo:

    In the Projects Window, open the Files>Icons folder. Double click loading-logo.png (it will bring up the deafult C2 image editor and open your own image.) The default cyan blue progress bar will be resized to the width of your icon.

  • What I'm saying is only using a fixed value (0.1 is fixed) for the last parameter won't give anything but an easing out effect.t.

    okay, I'll give that a try.. thanks!

  • although for easein&out seems like you would need a 4th value that defines the curve maybe?

  • R0J0hound cosp seems to have an Ease In effect as well no?

    I've used lerps inside of a lerp..

    i.e. lerp(lerp(a,b,0.1),lerp(c,d,0.1),0.1)

    it depends on the application but maybe I can give lerp an Ease In effect by changing both values at different rates?? (now I'm starting to go over my own head)

  • hey Drew, it's looking great!

  • linkman2004 ahh very nice.. works like a charm!

    thanks, I needed this formula and I couldn't use the turret behavior for what I am doing... thanks again!

  • R0J0hound trying to get predictive aim working, but it's not...what am I doing wrong?

    https://dl.dropboxusercontent.com/u/362 ... t_aim.capx

  • The main way to use easing like that is this:

    yes I've used lerp and cosp already just like this.. I was just hoping to use cosp with angles. I would definitely request an anglecosp() function.. how else is there to ease in/out simply.

    your old turret capx is a good work around though- thanks. I should be able to adapt it to my needs but it would be so much more simple to have 1 math function. I wonder if I could just do an Ease In and then fake the Ease Out. I could do the lerp backwards somehow..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks R0J0hound ! This is actually for a top-down space shooter.. I have a big heavy cruiser that catches up with the player (in a straight line making course corrections until the ship is in range). Once the Cruiser is in range, it slows down and uses it's 360 degree cannon to shoot at the player. Once the player is out of range the Cruiser needs to pursue. This is where the easing comes in.. If the Cruiser needs to rotate it looks horrible with lerp() because there is no easing into the rotation - it happens way too fast - and if I slow the rate down, the ship does WAY too big of a loop to catchup to the player. It looks fine easing out of the rotation.

    I'm just trying to make the movement seem semi-realistic due to the size of the ship - with so much mass you'd probably see slow and small rotations.

    so currently I'm doing:

    anglelerp(self.Angle,angle(self.X,self.Y,Player_ship.X,player_ship.Y),0.005)

    and instead I need:

    anglecosp(self.Angle,angle(self.X,self.Y,Player_ship.X,player_ship.Y),0.005)

    The one bug is if the course corrections(Cruiser ship rotation) are still happening when the target is in range. (because it's not supposed to rotate when the target is in range). The rotation suddenly stops - which kills the easing. But I've coded for that giving the ship some fake "aftertouch" which helps it looks like it'm slowing down to a natural speed. Even if it over shoots it doesn't matter since the ship has a gun with a 360 degree range - as long as it's headed in the direction of the player its fine.

    thanks for the capx.. that looks perfect! it should work!

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies