Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Dev_Sebas on July 15, 2012, 01:52:49 PM

Title: (SOLVED)Possibly to get normal of the hited face
Post by: Dev_Sebas 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
Title: Re: Possibly to get normal of the hited face
Post by: jeanfabre on July 16, 2012, 03:13:33 AM
Hi,

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

bye,

 Jean
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas on July 16, 2012, 06:27:51 AM
Hi Jean
By a raycast.
Title: Re: Possibly to get normal of the hited face
Post by: jeanfabre 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 (https://hutonggames.fogbugz.com/default.asp?W491)

bye,

 Jean
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas 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
Title: Re: Possibly to get normal of the hited face
Post by: jeanfabre on July 17, 2012, 04:26:10 AM
hi,

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

Jean
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas 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?

Title: Re: Possibly to get normal of the hited face
Post by: jeanfabre 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 (http://hutonggames.com/playmakerforum/index.php?topic=900.msg3781#msg3781)

bye,

 Jean
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas on July 17, 2012, 09:02:37 AM
Hi Jean.
I´m gonna check it again for see if is everything is good.
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas on July 17, 2012, 09:13:06 AM
Oh I forgot that!!
Damm I´m gonna implement it right now.
Bye
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas 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?
Title: Re: Possibly to get normal of the hited face
Post by: Dev_Sebas 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