首页 > 其他分享 >4-The_Partical_physics_engine

4-The_Partical_physics_engine

时间:2024-03-12 15:25:08浏览次数:36  
标签:engine speed energy mass projectile Partical velocity physics

Ballistics

One of the most common applications of physics simulation in games is to model ballistics. This has been the case for two decades, predating the current vogue for physics engines.Regardless of the object being fired, we will call this a “projectile.”

SETTING PROJECTILE PROPERTIES

Instead, if we want the projectile’s motion to be visible, we use muzzle velocities that are in the region of 5 to 25 m/s for a human-scale game.(实际游戏的发射体速度比真是子弹的速度要小的多)。This causes two consequences that we have to cope with.

  • First, the mass of the particle should be larger than in real life, especially if you are working with the full physics engine.The effect that a projectile has when it impacts depends on both its mass and its velocity: if we drop the velocity, we should increase the mass to compensate. The equation that links energy, mass, and speed is

\[e = ms^2 \]

where \(e\) is the energy and \(s\) is the speed of the projectile (this equation doesn’t work with vectors, so we can’t use velocity). If we want to keep the same energy, we can work out the change in mass for a known change in speed:

\[\Delta m = (\Delta s)^2 \]

  • Second, we have to decrease the gravity on projectiles.Since we’ve slowed velocity down, gravity will have to slowed download.For a known change in speed we can work out a “realistic” gravity value using the formula:

\[g_{bullet} = \frac{1}{\Delta s}g_{normal} \]

标签:engine,speed,energy,mass,projectile,Partical,velocity,physics
From: https://www.cnblogs.com/ultramanX/p/18068372

相关文章

  • Tengine 安装 nginx-module-vts 模块
      使用Tengine作为反向代理服务器,发现Tengine日志中接口请求过慢,需要绘制grafana展示详细的接口情况------------------------------------------------------------------------------------------------------------------------------------解决思路#......
  • UnrealSharp: 一个可以让你在UnrealEngine5中采用C# 12和.NET 8.0开发的插件
    写着玩的,就当学习Unreal练手的玩意儿了。主要特性:支持.NET6.0~.NET8.0[默认为.NET8.0],支持C#12支持在C#中创建新的Unreal类、Unreal结构、Unreal枚举等支持为C#类创建新的Unreal属性、Unreal函数和Unreal多播委托。支持C#类继承UnrealC++类,这意味着您可以......
  • The First Software Engineering Homework
    这个作业属于哪个课程软件工程2024-双学位(广东工业大学)这个作业要求在哪里软件工程第一次作业这个作业的目标熟悉Markdown语法,熟悉git操作,学会写blog。其他参考文献目录1个人简历1.1自我介绍1.2当前水平2展望未来2.1阅读《构建之法》2.2未来规......
  • mysql报错:SQL 错误 [1030] [HY000]: Got error 100 - 'InnoDB error' from storage en
    在mysql中进行alter时,报错:SQL错误[1030][HY000]:Goterror100-'InnoDBerror'fromstorageengine 原因:在配置my.cnf或my.ini里面innodb_force_recovery参数的值大于0,它默认值为0,如果大于0,innodb就会禁用insert、update、delete、alter语句。解决方式:在配置my.cn......
  • tdengine的备份与恢复
     1. 使用系统安装时自带的taosdump.exe命令 2.备份指令:taosdump-Dqydb-oc:/tdengine/bak-hh1_taos-uroot-ptaosdata参数:-D后面是要备份的数据库名称      -c备份的路径      -h主机名,参考taos.cfg配置文件中的fqdn参数      -u用户名   ......
  • pytorch报错:Variable._execution_engine.run_backward( # Calls into the C++ engine
    GPU模式下运行pytorch代码报错,pytorch为2.2.1,NVIDIA驱动版本535.161.07File"/home/devil/anaconda3/envs/sample-factory/lib/python3.11/site-packages/torch/_tensor.py",line522,inbackwardtorch.autograd.backward(File"/home/devil/anaconda3/envs/sample-......
  • Centos7从rpm包安装docker engine
    Centos7从rpm包安装dockerenginecentosdockerCentOS7可以安装dockerengine,但是不能安装dockerdesktop。我和系统版本是7.9.2009(Core)。一、下载rpm包rpm包有两个来源,它们的功能不同。1.dockerrpm包从网站https://download.docker.com/linux/centos/上选择CentO......
  • 如何安装earthengine-api
       第一篇 直接使用 pipinstallearthengine-api命令提示找不到相匹配的earthengine-api版本。发现earthengine-api只支持64位的python。 于是,去查看了我电脑的操作系统是多少位的,打开cmd,输入systeminfo 小小的脑袋大大的疑惑,电脑的操作系统是64位的呀。......
  • 智能物联引擎(AIoTengine)
    智能物联引擎(IntelligentInternetofThingsEngine)是一个综合性的技术平台,它将物联网(IoT)与人工智能(AI)技术相结合,实现对物联网设备和数据的智能处理、分析和优化。智能物联引擎的目标是提供一个高效、灵活和可扩展的解决方案,以支持物联网应用在各种场景中的部署和实施。智能物联......
  • C# WPF Halcon HDevEngine混合编程
    C#WPFHalconHDevEngine混合编程WPF+Halcon引用halcondotnet.dll和hdevenginedotnet.dllXAML中导入命名空间xmlns:halcon=“clr-namespace:HalconDotNet;assembly=halcondotnet”。输入xmlns后,tab选择halcon,然后再tab就自动输入)WPF布局,创建HWindowControlWPF窗口2.HDevEn......