So basicly i want to code a footstep system. And everything just worked fine ! I shot a ray from the player to the ground but then i need the Physicsmaterial from my FHitResult variable. And i have no idea how i can do this.
Announcement
Collapse
No announcement yet.
[C++]How can i get The Physics Material with my FHitResult ?
Collapse
X
-
When you setup the trace parameters, use the following:
TraceParams.bReturnPhysicalMaterial = true;
et voila!Everything @ Stormtide Games - Snr Programmer @ Black Matter Pty.
Twitter - YouTube - Tutorials and Resources: jambax.co.uk
Games: Satellite Command - Hell Let Loose - Project Orion - Eclipse
Marketplace: Sparse Grid Plugin - Export PNG
-
If you use the TraceParams the Hit Result will have the physics material
https://docs.unrealengine.com/latest...ial/index.html
It's a smart pointer so you can check if it is valid and then use .Get() to get the actual material pointer.
greetings,
FTCAdventure Kit: UDK / UE4
Buy the Kit: Marketplace
Scan FX: Marketplace
www.freetimestudio.net
[Youtube][Twitter][Facebook]
Comment
Comment