playMaker

Author Topic: Sphere moves around cube mechanic?  (Read 108 times)

Lorenzo.

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Sphere moves around cube mechanic?
« on: April 14, 2021, 07:16:29 AM »
Hi,

I really like the game Kula World and I want to fan-remake this game. I have done little stuff with Playmaker and I can get everything working except the main core mechanic. Which is when the sphere reaches the end of a cube/block instead of falling off it need to go to that side of the cube/block. But I have no clue how to achieve this. I have tried triggers with rotate but it all does not seem to work, so it's time to call in the experts.

The core mechanic I mean can be seen in this video: (40 seconds in the video). Also the core mechanic is not needed all the time. Sometimes the sphere just need to stop at the edge. Also something I can't seem to figure out, I have done a POC with an invisible wall/plane but that might not be smart when building the levels.

Thank you for your time and I hope you can help me.

Best Regards,
Lorenzo.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6021
    • View Profile
    • jinxtergames
Re: Sphere moves around cube mechanic?
« Reply #1 on: April 14, 2021, 08:48:08 AM »
Hi.
It looks like the game has like preset positions where it moves to.

on arriving to a point you could do 2 raycasts, 1 forward to see if there is a wall.
if so rotate and go to next point, if not check floor.

another way (which i think it used here) is have everything preset in a fsm.

so for example if you reach a point that needs rotate it will automatically do that when point x is reach

also for single turns you can make it do that automatically.

and for 2/3 way you can then wait for controller input.

Lorenzo.

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Sphere moves around cube mechanic?
« Reply #2 on: April 14, 2021, 08:52:28 AM »
Hi.
It looks like the game has like preset positions where it moves to.

on arriving to a point you could do 2 raycasts, 1 forward to see if there is a wall.
if so rotate and go to next point, if not check floor.

another way (which i think it used here) is have everything preset in a fsm.

so for example if you reach a point that needs rotate it will automatically do that when point x is reach

also for single turns you can make it do that automatically.

and for 2/3 way you can then wait for controller input.

Hmm, I need to look into those options. Not sure how I could do that on top of my head. But thanks. If I make the cube a prefab than I just can build the world with the blocks right. Or if I choose to use ProBuilder I can attach this to a ProBuilder block/prefab right?

Again thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6021
    • View Profile
    • jinxtergames
Re: Sphere moves around cube mechanic?
« Reply #3 on: April 14, 2021, 08:59:32 AM »
Hi.
Preset position can just be empty objects, which you can add :D

Lorenzo.

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Sphere moves around cube mechanic?
« Reply #4 on: April 14, 2021, 09:01:29 AM »
Hi.
Preset position can just be empty objects, which you can add :D

Yeah I have those in place, because I was testing with triggers, so that's nice :)
I think I understand what you mean. I will play with this, thanks again.