Coder Social home page Coder Social logo

risooonho / cyberpunkmechanics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unrealprojectprogramming/cyberpunkmechanics

0.0 1.0 0.0 77.88 MB

Hello Guys ! I will be making some of cyberpunk 2077 mechanics, feel free to use my code in your game.

C# 2.76% C++ 96.66% C 0.58%

cyberpunkmechanics's Introduction

CyberpunkMechanics

Hello Guys ! I will be making some of cyberpunk 2077 mechanics, feel free to use my code in your game.

Alt Text

For now I did the the KANG TAO TYPE 41 Video ( auto bullet travel to target weapon ) and I am willing to create the bullet deflection in the wall and some other mechanics in my free time ;)

I am using C++ and blueprint in these mechanics ceration but mostly C++

Here is a Snippit from the code, check the Commit if you wanna see the full code ;)

void ACyberProjectile::HomingMissile(AStaticMeshActor* TargetToHit)
{
	if (TargetToHit && ProjectileMovement)
	{
		auto HittingTarget = TargetToHit->GetStaticMeshComponent();
		if (HittingTarget == nullptr)
		{
			UE_LOG(LogTemp, Warning, TEXT("Null Hitting target"));
			Destroy();
			return;
		}
 		ProjectileMovement->HomingTargetComponent = HittingTarget;
		ProjectileMovement->bIsHomingProjectile = true;
		ProjectileMovement->HomingAccelerationMagnitude = FMath::RandRange(15000.0f, 25000.0f);
	
		UE_LOG(LogTemp, Warning, TEXT("HomingTargetComp or ProjectileMovment are Nullptr"));
		
 		// To allow for more random moving up and down when we shoot the projectile.
		FVector NewVelocity = FVector(ProjectileMovement->Velocity.X,
									  FMath::RandRange(-300.0f, 300.0f),
									  FMath::RandRange(-300.0f, 300.0f));
 		ProjectileMovement->SetVelocityInLocalSpace(NewVelocity);
 	}
	PlayParticleEffects();
}

cyberpunkmechanics's People

Contributors

mazenmorgan avatar

Watchers

James Cloos avatar

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.