Getting mesh normal from Raycast


#1

Hi Guys ! Im new to Armory and aaaalmost in love with it. :wink:

Need some help regarding logic nodes:
When I use a Raycast Node, I can obtain the object that was hit =>
And via the object I can access its mesh =>
But even further, how can I access the interpolated normal of the barycentric coord ?
(what property of the mesh can I actually access via nodes right now ?)

I basically want to refine the fps controller because when the player currently sits on a slight slope he begins to slide down.
I want to disable physics for that matter and do it properly with raytracing and a slope treshold.

If this kind of stuff is not accessible via nodes, how would I access the mesh normal in Haxe through the api ?
I’d like to do one for the community by creating some easy to use custom nodes, but I really would like a push in the right direction. Just to get off the ground. :wink:
I am a bit lost searching the API documentation right now: http://armory3d.org/manual/api/iron/data/Geometry.html
(Also the “Box Generator” example helped me a little already.)

I would love your Input regarding this, thanks for any hint !
Cheers !


#2

If you want to make it so that you don’t slide on a slope, you should go to the physics tab instead of the logic nodes.


#3

Well, thanks but as mentioned: Physics deactivated for that. :slight_smile:
Lets just boil it down to the question: How can I access the mesh normal from the point(barycentric) of the raycasthit?
Thx!