playMaker

Author Topic: Making Climb Wall, how to keep face the wall?  (Read 1369 times)

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Making Climb Wall, how to keep face the wall?
« on: June 14, 2020, 03:30:15 AM »
Hi all,

I am making climb mechanic for my game, able to stick my player on wall but unable to maintain  the player to face the wall. Im using raycast to get the normal of the wall, invert it and use smooth look at direction but no luck?
Or maybe i get the concept wrong.
Thanks:)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Making Climb Wall, how to keep face the wall?
« Reply #1 on: June 14, 2020, 06:47:57 AM »
Hi.
Maybe this video can help :


It places the bullet holes in the correct rotation, but the system could probably be use to do this as well (with some changes)

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Making Climb Wall, how to keep face the wall?
« Reply #2 on: June 16, 2020, 04:40:18 AM »
Thanks..manage to align to surface.But drastic change in surface angle  will make my rotation going crazy. Maybe need a little more tricks.

Thanks

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Making Climb Wall, how to keep face the wall?
« Reply #3 on: June 16, 2020, 05:44:27 AM »
You could calculate the direction with destination vector - starting point vector, which should tell you where the wall is.

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Making Climb Wall, how to keep face the wall?
« Reply #4 on: June 23, 2020, 01:54:54 AM »
You are right sir, that a good theory.Ill try thats and Thanks:)