我在哪里可以学习游戏物理学的基础知识和背后的数学知识? [英] Where can I learn the basics of game physics and the math behind it?

查看:59
本文介绍了我在哪里可以学习游戏物理学的基础知识和背后的数学知识?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大学上过数学(三角学,微积分II ...),但我不知道为什么在游戏物理学中使用tan,arctan等.我知道我可以找到有效的代码并了解所有内容,但为什么我要使用特定的触发函数,但我却不想这么做.

I taken math in college (trigonometry, calculus II...) but I don't know why you use tan, arctan, etc., in game physics. I know I can find working code and understand everything except why I am using a particular trig function, but I don't want that.

我想知道为什么我使用arctan或sin.在哪里可以了解为什么我要使用该特定的数学函数使球逼真的反弹?

I want to know why I am using arctan or sin. Where can I learn about why I am using that particular math function to make a ball bounce realistically?

感谢您的帮助.

我是否需要参加入门级物理课才能理解游戏物理?

Do I need to have taken an entry level physics class to understand game physics?

推荐答案

本质上,您正在使用trig在同一世界的不同表示形式之间进行转换.速度可以在2D世界中表示为一个角度和一个大小.或作为增量x和增量y.

You are using trig, essentially, to convert between different representations of the same world. A velocity can be expressed in a 2D world as one angle and a magnitude. Or as a delta x and a delta y.

您正在使用正弦和余弦将极坐标从(再次在2D中)转换为直角坐标.您正在使用arctan进行其他操作. (希望您的语言具有arctan2函数,以使您进入正确的象限.)

You're using sine and cosine to convert from (in 2D again) polar coordinates to rectangular coordinates. You're using arctan to go the other way. (Hopefully, your language has an arctan2 function to get you into the correct quadrant.)

您并不需要严格进行操纵-我已经完成了包括矢量在内的整个3D商业视频游戏的矢量操作.如果您了解向量,矩阵和角度之间的关系,就会知道如何操作.

You don't strictly need the trig--I've done entire 3D commercial videogames in vectors, including all the camera moves. If you learn the relationship between vectors, matrices, and angles, you'll know how.

编辑以解决问题的修改:

您必须参加游戏物理入门课程吗?

Do you have to take an entry physics class for game physics?

不伤人.这取决于您希望物理学有多现实.游戏中有很多假的物理,也有一些真实的"物理.我只用了几个方程式就完成了整个台球游戏.让我来谈谈两个共同的领域.

It can't hurt. It depends on how realistic you want your physics. There's a lot of fake physics in games and there's some "real" physics, too. I did a whole billiards game with just a couple equations. Let me address a couple of common areas.

  1. 冲突.方程很简单.实施很困难.您不需要物理课程.

  1. Collisions. Equations are simple. It's the implementation that's tough. You don't need the physics class.

摩擦和旋转.无论您对教科书的物理知识多么了解,这在离散的时间都是很难的.其中一些您最终会伪装,但有助于您了解真实的东西.

Friction & spin. This is hard in discrete time no matter how well you know textbook physics. Some of this you'll end up faking, but it helps to know the real stuff.

线,滑轮,杠杆,堆叠的盒子等.是的,上课.

Strings, pulleys, levers, stacked boxes, etc. Yeah, take the class.


另一个要考虑的因素是您的游戏中有多少是基于物理学的,而有多少则不是.如果一个巨大的怪物将一栋建筑物扔到另一栋建筑物上,会发生什么?该建筑物的动画可能不是物理的.如果艺术家的角色动画使怪物的尾巴从建筑物中掠过,会发生什么?很少有游戏是100%实体的.


Another consideration is how much of your game is physics-based and how much isn't. If a giant monster throws a building at another building, what happens? The building may have a falling animation that is not physical. What happens if a monster's tail sweeps through a building as a result of an artist's animation of the character? Very few games are 100% physical.

这篇关于我在哪里可以学习游戏物理学的基础知识和背后的数学知识?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆