# \[New Wiki\] Create custom Hand Crafted Cubic Curves in Editor for Use in C++

**URL:** <https://forums.unrealengine.com/t/new-wiki-create-custom-hand-crafted-cubic-curves-in-editor-for-use-in-c/10514>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [August 31, 2014, 9:59pm UTC](https://forums.unrealengine.com/t/new-wiki-create-custom-hand-crafted-cubic-curves-in-editor-for-use-in-c/10514 "2014-08-31T21:59:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 31, 2014, 9:59pm UTC](https://forums.unrealengine.com/t/new-wiki-create-custom-hand-crafted-cubic-curves-in-editor-for-use-in-c/10514/1 "2014-08-31T21:59:53Z")

</div>

Dear Community,

I’ve just posted a new wiki tutorial that shows you how you can hand-craft cubic curves in the editor to then use them to drive physics animations or any other custom C++ mechanic!

So what I am showing you is how you can easily create custom spring dampen curves, or fall off curves, or literally any shape curve you want, with the complete ease of UE4’s visual curve editor, and then use the custom curves you create in UE4 C++ to drive any game mehcanics you want!

```auto

**Pics**

https://d26ilriwvtzlb.cloudfront.net/b/b7/CurveFinal.jpg

https://d26ilriwvtzlb.cloudfront.net/d/db/MiscCurve.jpg

https://d3ar1piqh1oeli.cloudfront.net/e/e4/CurveAuto.jpg/1050px-CurveAuto.jpg

https://d3ar1piqh1oeli.cloudfront.net/6/6c/CharBP.jpg/1050px-CharBP.jpg

```

**.H**

```auto

UCLASS()
class AYourCharacter : public ACharacter
{
	GENERATED_UCLASS_BODY()
 
 
	/** Joy Curve */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="JoyCurve")
	UCurveFloat* JoyCurve;    
 
 
	//Rama's Draw Point wrapper
	FORCEINLINE void DrawPoint 
	(
		const FVector& Loc,
		const float Size = 7,
		const FColor& Color = FColor::Red,
		const float Duration=-1.f
	) const {
		DrawDebugPoint(
			GetWorld(), 
			Loc,  
			Size, //thickness
			Color, 
			false,
			Duration
		);
	}

```

````auto
**CPP**

```

//Tick
void AYourCharacter::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	// ~~~~~~~~~~~~
 
 
	// ~~~Draw the Curve!~~~
 
	if(JoyCurve)
	{
		for(float v = 0; v < 1; v+=0.01)
		{
			DrawPoint(GetActorLocation() + FVector(v * 128,0,128 * JoyCurve->GetFloatValue(v)) );
		}
	}
	else
	{
		//UE_LOG "Joy CURVE IS INVALID!!!!";
	}
}

```

````

**Wiki Tutorial**

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Enjoy!

Rama
