查看: 398|回复: 7

[虚幻编辑器手册] 【3. Adjusting Actor Physics Collision | Unreal Engine】[虚幻...

[复制链接]

1

主题

342

帖子

7万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
75866
发表于 2016-6-24 20:51:27 | 显示全部楼层 |阅读模式



Previous Step




Next Step调整 Actor 属性


Here we will adjust the 物理模拟 for our Actor as well as the Collision properties inside the Details panel. By adjusting these settings we can define how an Actor responds to other Actors in the game world. We can set our Actor to simulate physics which will allow us to bump into and push the Actor around in the world as well as define how it responds to collision with other Actors.
Steps
With the Shape_Sphere selected, in the Details panel under Collision, check the Simulation Generates Hit Events checkbox.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



With this option checked, we can determine if the sphere hits something.

Also in the Collision section, click the Collision Presets drop down and select Physics Actor.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



Since we are going to simulate physics, this setting will handle the physics responses for us.

In the Physics section, check the Simulate Physics checkbox.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



There are additional options you can set here such as the Damping or Contraints which can affect how physics for the Actor are simulated however for this tutorial all we are going to do is simulate physics so it can be affected by physics during gameplay.

If you play in the editor now, you will see the sphere roll down the stairs and you can walk into it and push it around since it is a Physics Actor. In order to test the Hit Events, we will use a little bit of 蓝图可视化脚本 to kill the player when hit by the sphere.

With the sphere selected in the level, on the Main Toolbar click the Blueprints button then select Open Level Blueprint.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



Right-click in the graph window, then under Add Event for Shape Sphere and Collision, select the Add On Actor Hit event.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



This will now fire an event when the sphere hits something.

Off the OnActorHit node, drag off the Other Actor pin and search for Cast To ThirdPersonCharacter then select it in the window.



【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



Here we are checking to see if the Other Actor we hit is the ThirdPersonCharacter (or Player used with this template).

Drag off the As Third Person Character pin of the Cast node and search for and add the Destroy Actor node.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



If ThirdPersonCharacter was the Other Actor hit, then destroy ThirdPersonCharacter (killing the player character).

Click the Compile button in the upper-left corner of the window to finalize the Blueprint, then close the window.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



From the Main Toolbar, click the Play button to play in the editor.

【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...


End Result
When you play in the Editor now, you can use WASD to move the character around and the Mouse to manipulate the camera. You should see that the sphere now rolls down the stairs and if you walk into it, it should kill the character making them disappear (press Esc to exit the play session after you have been "killed").

This should give you a brief understanding of how to edit the properites of Actors through the Details panel of the main Level Editor. For more information, please see the related topics below.



   
Previous Step




Next Step调整 Actor 属性




     



   
【虚幻4翻译文档-3. Adjusting Actor Physics & Collision | Unreal Engine】[虚幻...



      




   


      相关页面

  




       详细信息面板








      详细信息面板用户界面








      物理模拟








      碰撞总览








      蓝图可视化脚本




回复

使用道具 举报

0

主题

820

帖子

2679

积分

vip会员

Rank: 1

积分
2679
发表于 2016-7-2 18:06:14 | 显示全部楼层
下来看看,多谢楼主分享了。
回复 支持 反对

使用道具 举报

0

主题

869

帖子

2871

积分

vip会员

Rank: 1

积分
2871
发表于 2016-7-3 17:31:15 来自手机 | 显示全部楼层
好东西,多些楼主分享
回复 支持 反对

使用道具 举报

0

主题

900

帖子

2931

积分

vip会员

Rank: 1

积分
2931
发表于 2016-7-4 10:00:52 | 显示全部楼层
啊啊啊啊,好多好多好多
回复 支持 反对

使用道具 举报

0

主题

853

帖子

2778

积分

vip会员

Rank: 1

积分
2778
发表于 2016-7-6 01:39:01 来自手机 | 显示全部楼层
看一下你发的到底是什么鬼!
回复 支持 反对

使用道具 举报

0

主题

906

帖子

2975

积分

vip会员

Rank: 1

积分
2975
发表于 2016-7-8 01:48:14 | 显示全部楼层
啊啊啊啊,好多好多好多
回复 支持 反对

使用道具 举报

0

主题

880

帖子

2958

积分

vip会员

Rank: 1

积分
2958
发表于 2016-7-9 20:54:06 | 显示全部楼层
来看看......
回复 支持 反对

使用道具 举报

0

主题

855

帖子

2841

积分

vip会员

Rank: 1

积分
2841
发表于 2016-7-12 09:02:32 来自手机 | 显示全部楼层
不错哦  下载看一下啊
回复 支持 反对

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | enginedx注册

本版积分规则

 
 



邮件留言:


 
返回顶部