# 3D Attributes in a 2D game

**URL:** <https://qa.fmod.com/t/3d-attributes-in-a-2d-game/20534>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [August 11, 2023, 11:57pm UTC](https://qa.fmod.com/t/3d-attributes-in-a-2d-game/20534 "2023-08-11T23:57:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jmcmorris](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jmcmorris/32/5406_2.png) [@jmcmorris](https://qa.fmod.com/u/jmcmorris)\
**Post date:** [August 18, 2023, 2:37am UTC](https://qa.fmod.com/t/3d-attributes-in-a-2d-game/20534/3 "2023-08-18T02:37:34Z")

</div>

Hey Leah, thanks for the response. Here’s what the code looks like for when I setup my listener attributes.

```auto
s_fmod3DAttributes.forward = FMOD_VECTOR {1.0f, 0.0f, 0.0f};
s_fmod3DAttributes.up = FMOD_VECTOR {0.0f, -1.0f, 0.0f};
s_fmod3DAttributes.position.x = position.x;
s_fmod3DAttributes.position.y = position.y;
s_system->setListenerAttributes(0, &s_fmod3DAttributes);

```

and here is where I set my event instance

```auto
FMOD_3D_ATTRIBUTES attributes {};
attributes.position.x = position.x;
attributes.position.y = position.y;
attributes.position.z = 0;
attributes.forward = FMOD_VECTOR {1.0f, 0.0f, 0.0f};
attributes.up = FMOD_VECTOR {0.0f, -1.0f, 0.0f};
eventInstance->set3DAttributes(&attributes);

```

I checked EventInstance::get3DAttributes and it is returning what I’m putting in. Does any of the above code look wrong? Thanks!

---

_[View the full topic](https://qa.fmod.com/t/3d-attributes-in-a-2d-game/20534)._
