playMaker

Author Topic: Getting Back/Front flips count  (Read 1022 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Getting Back/Front flips count
« on: June 06, 2020, 03:25:47 PM »
Hello !

Prototyping a Moto bike game. I managed to do back / front flip by action rotate 180 angles per second.

I want to get how many times player perform backflip and front flip on jump?

I couldn't figure out .

Thanks

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Getting Back/Front flips count
« Reply #1 on: June 06, 2020, 04:40:29 PM »
Make an int variable, and when the flip is being performed, use the action Int Add (+1).

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Getting Back/Front flips count
« Reply #2 on: June 06, 2020, 06:05:27 PM »
Make an int variable, and when the flip is being performed, use the action Int Add (+1).
I stuck with getting Flips.
I tried if player's rotation on X is below or higher than 359, consider flips. but, not giving any results. Value shown on Get Rotation action and Inspector are totally different

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Getting Back/Front flips count
« Reply #3 on: June 07, 2020, 04:07:56 AM »
Hi.
You could maybe use some triggers. if you are rotation the root you might need to do some trick.

basically have 1 parent. then have 1 trigger that will rotate.
Then some other triggers that will count the rotations.
The one rotation should be rotation with the bike, if you can't do it directly on the bike then use get/set rotation (get from bike / set to collider)

I think this system can even do more that only registering flips.