Test if a character is moving

Post Reply
Furya
Posts: 24
Joined: Tue Sep 22, 2015 1:34 pm

Test if a character is moving

Post by Furya »

Hi

I'm wondering how to test if a CharacterController is moving.

thanks
Furya
Posts: 24
Joined: Tue Sep 22, 2015 1:34 pm

Re: Test if a character is moving

Post by Furya »

up
S1L3nCe
Posts: 50
Joined: Thu Mar 24, 2016 10:22 am
Location: France

Re: Test if a character is moving

Post by S1L3nCe »

I've never used it but there is a getInterpolationLinearVelocity() method in btPairCachingGhostObject object

You could use it to get your velocity.

Look at here:
http://bulletphysics.org/Bullet/BulletF ... oller.html
Furya
Posts: 24
Joined: Tue Sep 22, 2015 1:34 pm

Re: Test if a character is moving

Post by Furya »

it doesn't work
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Test if a character is moving

Post by benelot »

What does not work, what did you try so far? Give us some input and we might be able to help you.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Test if a character is moving

Post by benelot »

@bulletpoints: Are you sure that unity uses the Bullet Character controller? Is that from some BulletC# wrapper or so?
Happymew
Posts: 1
Joined: Sat Apr 16, 2016 5:11 am

Re: Test if a character is moving

Post by Happymew »

benelot wrote:@bulletpoints: Are you sure that unity uses the Bullet Character controller? Is that from some BulletC# wrapper or so?
Was gonna ask the same question. Anyway, will try out the code and see how it does. Thanks.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Test if a character is moving

Post by benelot »

If you find out how it works, tell us, it might help others!
Post Reply