# Drawing debug lines to persona viewport from AnimNode

**URL:** <https://forums.unrealengine.com/t/drawing-debug-lines-to-persona-viewport-from-animnode/277475>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** Debugging, viewport, unreal-engine, editor, UE4, CPP, question\
**Created:** [March 20, 2014, 4:34am UTC](https://forums.unrealengine.com/t/drawing-debug-lines-to-persona-viewport-from-animnode/277475 "2014-03-20T04:34:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [March 26, 2014, 7:35am UTC](https://forums.unrealengine.com/t/drawing-debug-lines-to-persona-viewport-from-animnode/277475/4 "2014-03-26T07:35:44Z")

</div>

#Initialize(const FAnimationInitializeContext & Context)

```
UWorld * TheWorld = Context.AnimInstance->GetWorld();

```

* * *

I found a way to access the world context just fine in my Turn in Place Animation node, I have not fully updated it to UE4 though, but this is what worked in the Beta!

#Entire Source Code  
Full code here:

> **[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...

#Excerpt

```
void FAnimNode_VictoryTurnInPlace::Initialize(const FAnimationInitializeContext & Context) 
{
	//Init the Inputs
	BasePose.Initialize(Context);
	TurnPose.Initialize(Context);
 
	//Get the Actor Owner
	OwningActor = Context.AnimInstance-> GetSkelMeshComponent()->GetOwner(); 
 
	//Editor or Game?
	UWorld * TheWorld = Context.AnimInstance->GetWorld();
	if (!TheWorld) return;
	// ~~~~~~~~~~~~~~~~
 
	WorldIsGame = (TheWorld->WorldType == EWorldType::Game);
}
```

---

_[View the full topic](https://forums.unrealengine.com/t/drawing-debug-lines-to-persona-viewport-from-animnode/277475)._
