错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Pulling and Pushing

  • Casey Hardman

摘要

In this chapter, we’ll make use of raycasting to allow the player to point their camera at a GameObject with a Rigidbody and hold left-click to pull the object toward them or right-click to push it away from them. Rather than pulling and pushing by moving the Transform directly, we’ll apply force to the Rigidbody so that the physics system handles the motion for us. This will demonstrate how to manipulate Rigidbodies by applying forces to them.