저는 모노 게임에 빠른 속도로 글 머리 기호를 그려하려고합니다. "어느 속도가 느린가"가 약 400px/초이지만 약 1500px/초 정도 인 경우 텍스처를 "복제"또는 "고 스팅"하기 시작합니다. 나는 Monogame을 처음 접했고 그래픽에 대한 지식이별로 없다.빠른 움직이는 물체가 "고스트"흔적을 남깁니다.
"유령"효과를 생성하지 않고 고속으로 객체를 움직일 수 있습니까?
의 SpriteBatch 시작하기 :
sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, DepthStencilState.None, RasterizerState.CullNone,
null, Global.Camera.GetViewTransformationMatrix());
그리기 방법 :
public override void Draw(SpriteBatch sb)
{
Vector2 origin = new Vector2(source.Width/2, source.Height/2);
Rectangle tRect = Bounds;
sb.Draw(
texture: TDTGame.GameAssets.Texture,
destinationRectangle: tRect,
sourceRectangle: source,
rotation: MathHelper.ToRadians(Rotation - 270f), //Set rotation to forward of the texture.
color: Color.White,
origin: origin,
layerDepth: 1f
);
}
편집 :
유튜브 링크 : 총알의 here
운동 :
float traveledDistance;
public override void Update(GameTime gt)
{
float deltaTime = (float)gt.ElapsedGameTime.TotalSeconds;
traveledDistance += Speed * deltaTime;
Position += Forward * Speed * deltaTime;
if (traveledDistance > Range)
{
Destroy();
}
}
고스트 스크린 샷이나 고스트 동영상을 게시 할 수 있습니까? 유령이 환상 일 가능성이 있습니다. – craftworkgames
@craftworkgames 낮은 프레임 속도로 레코딩했을 때 흔적이 보이지 않는 것처럼 느껴집니다. 또한 정지 이미지 "prntscrn"에서 캡처하여 흔적을 표시하지 않았습니다. MonoGame.Extended 라이브러리를 사랑하십시오. 좋은 작품을 계속 말하고 싶습니다! –
그럴 경우, 배경색으로 놀아보고 그런 식으로 제거하거나 빠르게 움직이는 물체로 다른 게임을보고 흥미로운 일을하는지보십시오. – craftworkgames