playMaker

Author Topic: How to check for hitting a collider above?  (Read 1687 times)

Chaosgod_Espér

  • Playmaker Newbie
  • *
  • Posts: 7
How to check for hitting a collider above?
« on: January 19, 2015, 12:43:25 PM »
Hi there..

Now that my Jump System works in the basics:

I want to add some more dynamics. One of them is, to check if the player hits a collider of the map above his head.

now i tried to do that with Raycast:


The Line appears, but now the player gets stuck where he is. The AllHit Event isn´t started, and the rest of the State is not fired.. like the raycast makes the FSM stuck.

The Player has only a Character Controller Attached. The Map Objects have a Box Collider attached.


This 4 Images Should explain my problem (example of Sliding):
http://fs1.directupload.net/images/150119/bjahdnl3.png


What is wrong? :/
« Last Edit: January 19, 2015, 04:32:02 PM by Chaosgod_Espér »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to check for hitting a collider above?
« Reply #1 on: January 20, 2015, 07:52:49 AM »
You should raycast from a position closer to the Player's feet and ignore the player layer altogether. Have you tried that? The ray being inside the box iis likely one of the breaking issues here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Chaosgod_Espér

  • Playmaker Newbie
  • *
  • Posts: 7
Re: How to check for hitting a collider above?
« Reply #2 on: January 23, 2015, 06:45:13 AM »
i tried that.
And i tried to create an empty child which i use for Startpoint..

The Ray ALWAYS fires up to the bottom right of the screen, doesn´t matter if i leave Direction 0,0,0 or with random values or anything else..


I don´t know if there´s a Problem with unity or Playmaker.. But it seems to work when a friend tries it.. But not for me..


Here´s a Video of the problems:
https://www.youtube.com/watch?v=bd5ZuLBqIfM
« Last Edit: January 23, 2015, 07:38:44 AM by Chaosgod_Espér »