[behavior] rex_LJpotential (attracting or rejecting objects)

Post your completed addons to share with the community

Post » Thu Mar 02, 2017 11:51 pm

Here's a super crude GIF of my capx I posted above, should I use boids instead? (as you might have gathered, I would have no idea how to implement this)
Image
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Fri Mar 03, 2017 3:33 pm

@Zebbi

sample capx, here uses sine behavior to replace platform behavior for character moving.
Bullet has two states:
Go away : rejecting by obstacles
Go back: rejecting by obstacles and attracting by character

Try and error to get parameter A,B,m,n of this behavior.
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Fri Mar 03, 2017 3:49 pm

rexrainbow wrote:@Zebbi

sample capx, here uses sine behavior to replace platform behavior for character moving.
Bullet has two states:
Go away : rejecting by obstacles
Go back: rejecting by obstacles and attracting by character

Try and error to get parameter A,B,m,n of this behavior.

Thanks so much rex! I'll mod it into my engine and post an example when I'm done, really appreciate it! :D
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Fri Mar 03, 2017 5:50 pm

rexrainbow wrote:@Zebbi

sample capx, here uses sine behavior to replace platform behavior for character moving.
Bullet has two states:
Go away : rejecting by obstacles
Go back: rejecting by obstacles and attracting by character

Try and error to get parameter A,B,m,n of this behavior.

I'm trying to mod this with the car engine to get that smooth, floaty look that works so well with the knife. Whereabouts should I place my accelerate and left/right simulations? The bullet in your example is a great proof-of-concept, but the "rotate 10 degrees" gives it a fluttery look, and the car behavior has a nice bounce when it hits the solids.
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Fri Mar 03, 2017 6:05 pm

@Zebbi

Indeed, the behavior of your control target is customize by yourself, and it is independent of rex_LJpotential, which provides a leading angle only.
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Fri Mar 03, 2017 6:06 pm

rexrainbow wrote:@Zebbi

Indeed, the behavior of your control target is customize by yourself, and it is independent of rex_LJpotential, which provides a leading angle only.

Do you mean the bullet or the char? I want to use a car movement for the bullet, so it turns smoothly?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Fri Mar 03, 2017 6:07 pm

@Zebbi

The "bullet" object in my sample capx.
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Fri Mar 03, 2017 6:13 pm

rexrainbow wrote:@Zebbi

The "bullet" object in my sample capx.

Right, this was the idea I was thinking, but it doesn't really work, I need to actually work it out properly:
Image
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Sat Mar 04, 2017 12:04 am

@rexrainbow
rexrainbow wrote:@Zebbi

The "bullet" object in my sample capx.

Here's a modified version with the car engine, the bullet still doesn't "reject" the solids and gets caught, what did I do wrong?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Sat Mar 04, 2017 2:48 pm

@Zebbi

The problem might be the behavior of car (behavior)
Car behavior is not flexible then rotate-to (set angle), and it seems that car could not rotate if it can not move forward. It means that you might turn left/right early.
You might see my racing car sample capx in 1st post of this thread.
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests