# "SphereVisual" in Components and Collision Tutorial

**URL:** <https://forums.unrealengine.com/t/spherevisual-in-components-and-collision-tutorial/470078>\
**Category:** Pipeline & Plugins\
**Tags:** asset-pointer, unreal-engine, Visual-Studio, UE4, question\
**Created:** [August 20, 2020, 5:15pm UTC](https://forums.unrealengine.com/t/spherevisual-in-components-and-collision-tutorial/470078 "2020-08-20T17:15:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kungfu\_k3nny04](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kungfu\_k3nny04](https://forums.unrealengine.com/u/kungfu_k3nny04)\
**Post date:** [August 20, 2020, 5:15pm UTC](https://forums.unrealengine.com/t/spherevisual-in-components-and-collision-tutorial/470078/1 "2020-08-20T17:15:25Z")

</div>

I am trying to learn code in unreal engine, so im trying to use the Components and Collision tutorial. I’m stuck on the 1st “work-in-progress-code” where you set up everything. For some reason my “SphereVisual” pointer is giving me error after the line i set it up:

```
SphereVisual->SetupAttachment(RootComponent);
if (SphereVisualAsset.Succeeded())
	{
		SphereVisual->SetStaticMesh(SphereVisualAsset.Object);
		SphereVisual->SetRelativeLocation(FVector(0.0f, 0.0f, -40.0f));
		SphereVisual->SetWorldScale3D(FVector(0.8f));
	}
OurParticleSystem->SetupAttachment(SphereVisual);

```

I’m confused because this is only happening with “SphereVisual”. When i set up the “SpringArm” pointer i have no issues or with anything else in the 1st “work-in-progress code” section for that matter. I have the header files that were given the tutorial as well. I did this project on the 4.24 verison of the engine.

---

<div class="post-metadata">

**Author:** ![kungfu\_k3nny04](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kungfu\_k3nny04](https://forums.unrealengine.com/u/kungfu_k3nny04)\
**Post date:** [August 20, 2020, 5:50pm UTC](https://forums.unrealengine.com/t/spherevisual-in-components-and-collision-tutorial/470078/2 "2020-08-20T17:50:51Z")

</div>

the code i posted only shows where i used “SphereVisual” because that is where im getting errors the my actuall code is 1 for1 with the 1st work-in-progress section
