playMaker

Author Topic: climbing  (Read 5121 times)

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
climbing
« on: April 23, 2013, 07:36:05 AM »
hi,
i want to make my character move on meshes without using gravity.
so he should move from the ground on e.g. a vertical wall but he should stay on the wall and follow the walls' collider.
the idea is to make him climb
i tried using the match target action and setting ik goals  before but that was just a mess with tons of triggers and colliders.
i havent got a clue how to acheave this with playmaker.
any ideas?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2508
  • Mender of the past
    • View Profile
    • Cleverous
Re: climbing
« Reply #1 on: April 23, 2013, 07:49:38 AM »
What type of game? FPS/TPS/2Dss/RTS etc..

Lots of ways to approach it.. You could parent the player to an object, move that.. you could disable gravity if its a rigidbody.. you could create a platform under him and move that.. It really just depends on how your character controller is setup.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: climbing
« Reply #2 on: April 23, 2013, 07:56:10 AM »
its a third person game. the idea is when u press the right mouse button u go in climb state and u dynamicly follow the mesh colliders without gravity.i ve made some kind of crawl/climb animation to test it.
when u release the right mouse gravity is again applied.
hope this helps
think of the alien games but then in third person,
thnx for the quick reply :)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2508
  • Mender of the past
    • View Profile
    • Cleverous
Re: climbing
« Reply #3 on: April 23, 2013, 08:08:53 AM »
Does your character have a rigidbody? There is a Use Gravity (On/Off) Action.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: climbing
« Reply #4 on: April 23, 2013, 08:19:14 AM »
if i just switch of the rigid body it starts flying it needs to be somehow constraind to follow the the colliders

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2508
  • Mender of the past
    • View Profile
    • Cleverous
Re: climbing
« Reply #5 on: April 23, 2013, 08:25:41 AM »
There is a Controller Settings action that allows you to change the Slope Limit, that may be useful.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: climbing
« Reply #6 on: April 23, 2013, 02:18:56 PM »
thats not helping!
slope has nothing to do with what i'm trying to do
if anyone has a better idea?

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: climbing
« Reply #7 on: April 27, 2013, 03:19:53 AM »
I tried using raycast and setting the gravity based upon the hit normal but that isnt a waterproof system, seriously need help!

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
    • View Profile
Re: climbing
« Reply #8 on: April 27, 2013, 06:02:57 AM »
Why not check what wall the character is close to, then rotate the gravity to align with that wall? If it is a templerun game it would be simple to just switch the angle of the gravity to either side. It will become more complicated if it is a "free camera" game.

Also a fun problem will be making a nice transition from "gravity down" to "gravity left" of "gravity right" without some ugly popping and such. . Maybe a somersault animation or similar and blend in the gravity?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
    • View Profile
Re: climbing
« Reply #9 on: April 29, 2013, 06:49:53 AM »
I have been thinking about the same thing for one of my games, but without success... yet.
YOu might want to look at a payer controller asset on asset store with a Ninja character that can jump and climb up walls a la Lara Croft.

Theoretically though, I think you might want to just look at adding to you controller a vertical movement, WHEN the character is within a specific trigger zone, so surround all your climbable areas with a trigger area and do a movement in the up direction when button input is received... you probably have to turn off gravity at the same time, but if it only occurs IFF climb button is down, and gravity is re-applied on release, and player falls. YOu say this resulted in player floating?, but presumably this is because you controller is still active in other ways? In other words turn on a bit of hard coded animation while climbing?

Let us know how you get on, need this too!

:)

Mark

mister d

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: climbing
« Reply #10 on: April 29, 2013, 10:24:37 AM »
hi, ive tried working with triggers but that was a mess in my scenes :)
i've recontacted my programmer friend and asked how he would do it,
if he can manage to script it i should get a more better understanding how to do it
i'll post if i've find a way

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2508
  • Mender of the past
    • View Profile
    • Cleverous
Re: climbing
« Reply #11 on: April 29, 2013, 10:33:31 AM »
This is not really an easy thing to do, if its just a ladder that's one thing but if you want him to actually walk up the wall or move like the alien in aliens game then you're looking for a different approach. I think there is some info on that if you search the unity forums, i believe they try to get the normal of the nearest surface and apply gravity in that direction if the character is grounded, it not then it reverts to default gravity.

I can't really think of a more dynamic way of doing it than getting the normal vector and using that to manipulate gravity.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

greg

  • Junior Playmaker
  • **
  • Posts: 68
    • View Profile
Re: climbing
« Reply #12 on: April 29, 2013, 02:19:15 PM »
If he doesn't need to climb around corners i would swap the axis in controller move to YZ as long as he is touching a wall.