1. 程式人生 > >《UE4 FAQ》

《UE4 FAQ》

wiki quick 對話系統 real htm form logs lin image

Q:怎樣讓你的遊戲主角可以正對你而不是一直看到他的後背?

A:在你的主角類的blueprint裏面,點擊菜單欄上的”ClassDefault”按鈕,在detail面板中的Pawn欄下,將”Use Controller Rotation Yaw”默認的勾選取消;在你的主角類的blueprint裏面的CharacterMovement的details裏面, “Use Controller Desired Rotation”為false,”Orient Rotation to Movement”為true,”Rotation Rate”的Z值控制自動旋轉的時候的快慢,可以為540.0;

Q:怎樣實現一個開門動畫(不使用骨骼動畫播放的方式)?

A:可以利用UE4中的TimeLine node,它可以進行基於時間的簡單動畫:Timeline nodes are special nodes within Blueprints that allow for simple time-based animation to be quickly designed and played back based on in-game events. Timelines are somewhat like simple Matinee sequences in that they allow simple values to be animated and events to be fired off over time. These can be edited directly inside the Blueprint editor by Double-clicking

on the Timeline in the Graph tab or in the My Blueprint tab. They are specifically built for handling simple, non-cinematic tasks such as opening doors, altering lights, or performing other time-centric manipulations to Actors within a scene.

Web: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Timelines/index.html

具體步驟為:右鍵中增加一個timeline的節點,就會自動新增成為一個新的變量:

技術分享

雙擊這個節點,就會打開timeliness的專屬editor, 在裏面設定各中類型(float, int, vector)的trigger,設定其隨時間改變曲線; 在event graph裏面就可以訪問這些變量的值;

技術分享

Q:怎樣實現player踩踏到不同的材質的地面能夠發出不同的腳步聲?

A:可以利用UE4的physical material material的功能;

Q:UE4的localization是怎樣實現的?

A:在輸出到屏幕上一行字的機制中可以看出,文本信息是存儲在特定包中的;

技術分享

Q:怎樣利用UE4實現NPC對話系統?

A:

https://wiki.unrealengine.com/NPC_Dialogue_System_Tutorial

https://answers.unrealengine.com/questions/82451/npc-dialog-system.html

https://answers.unrealengine.com/questions/149343/umg-quest-dialog-issue.html

Q:怎樣實現一個物體接近地面的部分逐漸消失(如無腿幽靈)?

A:Node: in material editor, “DistanceToNearestSurface”;I use the DistanceToNearestSurface node to automatically detect the intersection between the terrain and a mesh. I combine this with a noise mask to get a nice procedural material transition.What really sells the effect is the adjustment of the vertex normals of the mesh.

Q:UE4中地形上的獨立石頭模型和地形本身融合不夠好,怎樣優化?

A:Web address: http://polycount.com/discussion/181140/unreal-4-terrain-blending-tool-inspired-by-star-wars-battlefront

《UE4 FAQ》