Git Product home page Git Product logo

kaimyentitysaba's Introduction

This GitHub Account is deprecated since I DO NOT WANT TO USE 2FA

Readme Card
Top Langs

💻 Environment

Arch Linux KDE Android Tiramisu 13

Material 3 is all of why I start playing with Android.

I don't use Windows or iOS, nor will I ever, Windows is the dumbest operating system in the universe!

I hate Microsoft.

OSU!mania 4K left-handed and 7K player, btw I'm not southpaw

4K : A W E F | 7K : A W E F M K L

Minecraft Tek mods player

🌱 Programming languages

C++ C Java Kotlin Python
Currently learning play with Julia, Clojure, Rust and Scala

🌱 Languages that I would never use

JavaScript C# Go Dart

I don't know shit about JavaScript, HTML or CSS.

kaimyentitysaba's People

Contributors

asuka-mio avatar dfdyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kaimyentitysaba's Issues

全平台自动下载支持

现在安装这个Mod需要手动下载和安装很多运行时环境。
这对我没什么影响,但是很麻烦。
而且有些动手能力不强的人,他们自己很难正确安装这个Mod,都被这复杂的安装劝退了.......
可以的话,希望能够添加自动运行时环境下载支持。
或者干脆把所有依赖文件都打包进jar。
这可以有效简化安装过程。

头发抽搐bug修复方案

BUG产生原因:当只有最底层的动作活跃的时候(其它层都是nullptr)原动画更新逻辑就没有任何问题
当复数层的动画活跃的时候,前一层更新了动画帧(假设这时候是站立IDLE),更新物理帧头发是按照你站立时候来算的,下一层更新动画帧(假设这一层是弯腰)并叠加,这时候动画骨骼就是呈现弯腰姿态,然后(bug产生)再次更新物理帧,是按照从站立突变到弯腰的过程来计算物理帧的,开始拉扯刚体,之后再到下一个更新周期的时候,前一层又将动画骨骼设置为站立姿态,这时候物理帧更新就会进行从弯腰到站立过程的计算......如此循环就会导致层与层之间动作不一致的时候,发生刚体争抢,表现为头发衣服等抽搐并有明显的往某一个特定点拉扯的现象

解决方法:在updatemodel的时候仅在动画活跃的最上层(最后一个有动画的层)更新物理帧

具体位置
KAIMyEntitySaba.cpp
修改这个方法
void KAIMyEntitySaba::UpdateModel(Model* model)
{
int maxAnim = 0;
double deltaTime = saba::GetTime() - model->prevSabaTime;
model->prevSabaTime = saba::GetTime();
double elapsed = deltaTime;
if (elapsed > PHYSICS_ELAPSED)
elapsed = PHYSICS_ELAPSED;

for (size_t i = 0; i < model->vmdAnimCount; ++i)
{
	auto vmdAnim = model->vmdAnims[i];
	if (vmdAnim != nullptr)
	{
		maxAnim = i;
	}
}

model->mmdModel->BeginAnimation();
for (size_t i = 0; i < model->vmdAnimCount; ++i)
{
	auto vmdAnim = model->vmdAnims[i];
	if (vmdAnim != nullptr)
	{
		double animTime = model->animTimes[i] + deltaTime;
		if (animTime * FPS > vmdAnim->GetMaxKeyTime())
			animTime = 0.0;
		model->animTimes[i] = animTime;


		if (i == maxAnim)
		{
			model->mmdModel->UpdateAllAnimation(vmdAnim, animTime * FPS, elapsed);
		}
		else
		{
			model->mmdModel->UpdateAnimation(vmdAnim, animTime * FPS);
		}

	}
}
model->mmdModel->EndAnimation();
model->mmdModel->Update();

}

MMDModel.cpp
添加这个重载
void MMDModel::UpdateAnimation(VMDAnimation* vmdAnim, float vmdFrame)
{
if (vmdAnim != nullptr)
{
vmdAnim->Evaluate(vmdFrame);
}

UpdateMorphAnimation();
UpdateNodeAnimation(false);

}

Github的排版好难用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.