[behavior] rex_LJpotential (attracting or rejecting objects)

0 favourites
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Zebbi

    I fixed in this capx, see event 9.

    Perfect! Thank you so much for your help, I'm trying to get my head around this great sequence of events, but some of the expressions are quite detailed for my poor head! Thanks again!!

  • Awesome plugin rex as usual.

    Question: In the "crowd" demo for example, sometimes the little boxes wiggle really quickly instead of following a smooth arc. Which of the settings would i need to play with to smooth our their movement? I'm not sure what the parts of the equation mean in relationship to how they move.

    thanks

    Did you figure out how to take the little jiggle out of the motion? I understand the objects are constantly attracting and rejecting forces, but I'd like to smooth it so the cars aren't shaking as they move, looking a little like they're driving over rough terrain

  • justifun

    This behavior only provide a "leading angle", user need to use this angle case by case.

    For example, car AI demos use this "leading angle" to simulate turn left/turn right. Crowd or rocket demos use this "leading angle" to rotate the angle.

    The parameters A,n,B,m will affect the result of "leading angle".

    rexrainbow would this method help smooth the micro shakes that the cars have? I tried playing with the parameters, but it didn't help.

  • Zebbi

    The car AI is described in event 1~ 6 in your LOOP.capx.

    • event 1 : when to update the command of the car
    • event 3, 4 : turn left or turn right the car
    • event 5, 6 : slow down or speed up the car

    You might change these conditions.

    ( The leading angle is CarF.LJ.ForceAngle )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Zebbi

    The car AI is described in event 1~ 6 in your LOOP.capx.

    - event 1 : when to update the command of the car

    - event 3, 4 : turn left or turn right the car

    - event 5, 6 : slow down or speed up the car

    You might change these conditions.

    ( The leading angle is CarF.LJ.ForceAngle )

    rexrainbow I'm not sure how to still have the car move properly whilst not adjusting left/right in increments, I'm sure if I was good at math I might be able to figure it out, but playing with these figures and it's not helping or changing anything. I'm not really sure what I'm supposed to be doing to be honest, I think I want the left/right steer to update less frequently?

  • Zebbi

    See my new LOOP.capx :

    Add "system condition: Is with in angle" --

    CarF.Angle within 3 degrees of CarF.LJ.ForceAngle

    before angle checking, you could try to increase (insensitive) the "within" degrees or decrease (more sensitive) it to see the result.

  • Zebbi

    See my new LOOP.capx :

    Add "system condition: Is with in angle" --

    CarF.Angle within 3 degrees of CarF.LJ.ForceAngle

    before angle checking, you could try to increase (insensitive) the "within" degrees or decrease (more sensitive) it to see the result.

    Ahh, I understand that! It looks perfect on your example, have you got magicam? I'm using that plugin to sort out zooms and such, and I'm getting shaking but I can't tell if it's my implementation or not? If you don't, I can try and use scrolling to see if it help the issue: https://www.dropbox.com/s/s5xb1deue5spe ... .capx?dl=0

  • OMG...this plugin is absolutely *amazing* ... thx soooo much, Rex, this will spare me several headaches.

  • OMG...this plugin is absolutely *amazing* ... thx soooo much, Rex, this will spare me several headaches.

    I think this plugin should be a standard in C2, it's that useful!

  • Zebbi

    MassimoF

    It is not easy even though using this behavior.

    • User need adjust the parameters of way-points or blockers , include position, to get a better steer angle for these cars.
    • And user need to define a reasonable conditions to drive the car ( AI of the car )

    I had not did well in the demo, cars still collided.

  • Looks cool.

    Trying to find where to download the behavior from. Says in the OP that included in the capx.

    I just can't seem to find it lol.

    Edit:

    Got it it the program. Don't know why it wasn't showing up even after restart.

    Edit2:

    Yea this is freakin sweet. Appreciate it. This will be used with my first android game if it exports right.

  • Here is another simple way to make car AI without any 3rd party plugins -

    Demo ( capx ),

    Demo2 ( capx )

  • Zombie hordes running from attractor to attractor as you pick 'em off. Probably use this in a tower-defense clone as well. Thanks for the research, rex...

  • so AI means every round they drive better? the v2 is really cool.

  • rexrainbow would this be useful for recreating Jill of the Jungle's knife? https://youtu.be/t7E-P4VJbdg?t=45

    Sometimes, her knife can't find it's way back to her and falls to the ground: https://youtu.be/t7E-P4VJbdg?t=23 but this wouldn't have that problem really, would it?

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