# Calling setListenerAttributes in game loop doesn't work

**URL:** https://qa.fmod.com/t/calling-setlistenerattributes-in-game-loop-doesnt-work/14902
**Category:** FMOD Engine
**Created:** [August 1, 2019, 1:10am UTC](https://qa.fmod.com/t/calling-setlistenerattributes-in-game-loop-doesnt-work/14902 "2019-08-01T01:10:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![glorantq](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/glorantq/32/272_2.png) [@glorantq](https://qa.fmod.com/u/glorantq)
#### Post date: [August 1, 2019, 1:10am UTC](https://qa.fmod.com/t/calling-setlistenerattributes-in-game-loop-doesnt-work/14902/1 "2019-08-01T01:10:08Z")

</div>

When calling setListenerAttributes in my game loop I always get `FMOD_ERR_INVALID_PARAM`, but calling it just after initialising the System I get `FMOD_OK` just as expected. This happens with any values I try to use.

These are the values I’m passing in with `FMOD_3D_ATTRIBUTES`

```
    FMODSystem > pos: {X: 928, Y: 0, Z: 1248 }
    vel: {X: 0, Y: 0, Z: 0 }
    up: {X: 0, Y: 1, Z: 1 }
    fwd: {X: 0, Y: 0, Z: 0 }
    03:04:33 [LWJGL Application] {ERROR} h.a.s.s.g.PlayScreen >> FMOD_ERR_INVALID_PARAM
```

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [August 5, 2019, 3:47am UTC](https://qa.fmod.com/t/calling-setlistenerattributes-in-game-loop-doesnt-work/14902/2 "2019-08-05T03:47:42Z")

</div>

The forward and up vectors must be of unit length (1.0).

[https://fmod.com/resources/documentation-api?version=2.0&page=core-api-common.html#fmod\_3d\_attributes](https://fmod.com/resources/documentation-api?version=2.0&page=core-api-common.html#fmod_3d_attributes)

Eg.

```auto
up: {X: 0, Y: 1, Z: 0 }
fwd: {X: 0, Y: 0, Z: 1 }

```
