playMaker

Author Topic: (SOLVED)Possibly to get normal of the hited face  (Read 6266 times)

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
(SOLVED)Possibly to get normal of the hited face
« on: July 15, 2012, 01:52:49 PM »
Possibly to get normal of the hited face of the object
Does Playmaker support this?And can anybody make this action?
Thanks
Hope you think about this.
Bye
« Last Edit: July 17, 2012, 06:19:35 PM by Sebastiao »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Possibly to get normal of the hited face
« Reply #1 on: July 16, 2012, 03:13:33 AM »
Hi,

 what do you mean by hit? a raycast? a collision?

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #2 on: July 16, 2012, 06:27:51 AM »
Hi Jean
By a raycast.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Possibly to get normal of the hited face
« Reply #3 on: July 16, 2012, 06:34:39 AM »
Hi,

 use the rayCast info, what you want is the "normal" property.

https://hutonggames.fogbugz.com/default.asp?W491

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #4 on: July 16, 2012, 07:05:41 AM »
I´m using that.But look.
When I shot I will create a cube.But I normally don´t have the cube parallel to hited face.My cube never rotates.
But I can see the value of rotation vector.

The normal vector3 is for apply on create object rotation.No?
Bye
Thank you

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Possibly to get normal of the hited face
« Reply #5 on: July 17, 2012, 04:26:10 AM »
hi,

 Sorry, I am not following what you are saying, can you rephrase? cheers,

Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #6 on: July 17, 2012, 06:44:18 AM »
Sorry about that Jean.

Ok my main objective is set my holes parallel to face hited.
But in my case they aren´t making that.
-That is happening in my case.The bad image.
-That should happen.The good image.

How can I make this?You say that is with the normal vector and put it on rotation in create object action.Right?

« Last Edit: July 17, 2012, 06:47:05 AM by Sebastiao »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Possibly to get normal of the hited face
« Reply #7 on: July 17, 2012, 07:51:27 AM »
Hi,

 Ok, so yes, you need to use the normal  that you find in that action, this is the right way. It is likely a problem with what you then do with that normal.

 Have you checked the sample I did a long time ago, it features a dynamic ray casting with an object that conform to the normal of the face.

http://hutonggames.com/playmakerforum/index.php?topic=900.msg3781#msg3781

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #8 on: July 17, 2012, 09:02:37 AM »
Hi Jean.
I´m gonna check it again for see if is everything is good.

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #9 on: July 17, 2012, 09:13:06 AM »
Oh I forgot that!!
Damm I´m gonna implement it right now.
Bye

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #10 on: July 17, 2012, 10:29:24 AM »
Humm ok ok this is great.Thank you a lot Jean. :D
Just a simple question.
Ray Cast should works with the mesh, not the mesh collider,right?

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Possibly to get normal of the hited face
« Reply #11 on: July 17, 2012, 06:18:11 PM »
Humm ok ok this is great.Thank you a lot Jean. :D
Just a simple question.
Ray Cast should works with the mesh, not the mesh collider,right?

Sorry by questening this. Of course it works with mesh colliders.
Bye
Thank you a lot Jean